Commit graph

11595 commits

Author SHA1 Message Date
Dan Carpenter 625aeb3aba Staging: wlan-ng: still setting wrong data
In commit 1ca1a92cc6 "Staging: wlan-ng: memsetting the wrong amount of
data" I changed the code so we didn't memset() past the end of the
msg1.bssid.data[] array.  Walter Harms noticed that it was weird that
we were setting the len to 6 when there were 7 elements in the array.
Pavel Roskin pointed out that the intent of the code was actually to
memset() msg1.bssid.data.data[] which is a 6 character array.

Reported-by: Walter Harms <wharms@bfs.de>
Reported-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-29 15:55:52 -08:00
Jorgyano Vieira 7223e86d57 Staging: crystalhd: Remove unused header bc_dts_types.h
The header bc_dts_types is not used, so we can remove it.

Signed-off-by: Jorgyano Vieira <jorgyano@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-29 15:55:15 -08:00
Jorgyano Vieira 01c3207091 Staging: crystalhd: Replace the local includes with global header
This patch replaces the local includes with the global header.
So the the crystalhd.h will be the only header included by the other files.

Signed-off-by: Jorgyano Vieira <jorgyano@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-29 15:54:39 -08:00
Jorgyano Vieira 4768f3f09a Staging: crystalhd: Add global header
In the crystalhd_cmds.h there was a struct dependence bug:
the struct crystalhd_adp (which  is declared on crystalhd_lnx.h)
is used on  the crystalhd_cmd struct, however the crystalhd_lnx.h is
never included on crystalhd_cmds.h at all. Including the
crystalhd_lnx.h on crystalhd_cmds.h breaks the build,
many dependencies error occurrs, most of the type
"error: 'struct bar' has no member named 'foo'",
so I decided to reorganize the headers by adding a global header.

The gobal header crystalhd.h includes all the local headers.
The idea is that the crystalhd header will be the only included
by the others files, this will avoid the mess of many #include levels.

The order of the headers included by crystalhd.h considers the
dependencies among the headers.

Signed-off-by: Jorgyano Vieira <jorgyano@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-29 15:54:39 -08:00
Andrew Miller 3be11133bf Staging: media: lirc: lirc_sasem.c: fixed long line coding style issue
Fixed some coding style issues.

Signed-off-by: Andrew Miller <amiller@amilx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-29 15:52:53 -08:00
Johannes Thumshirn 51be392603 Staging: android: timed_gpio: Removed spaces before tabs
Signed-off-by: Johannes Thumshirn <morbidrsa@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-29 15:52:52 -08:00
Peter Huewe 480491889f staging: asus_oled: Remove superfluous loop
This patch removes a superfluous loop in asus_oled.c
The code is equivalent to do{...} while (0) and thus executes the code
exactly once -> so we can simply remove the loop.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-29 15:43:21 -08:00
Tomas Winkler 1ca7e78286 staging: mei: kill struct hbm_cmd bit fields
Replace bitfield struct hbm_cmd with simple u8 as we
always access the value as whole. This allows us to remove
few ugly type casts
For possible further uses and documentation purposes we add
corresponding bitmask defines

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-29 15:43:20 -08:00
Devin J. Pohly dc91e2f1c0 staging: mei: fix typo in error code return
~ENODEV is a different number than -ENODEV

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-29 15:43:19 -08:00
Greg Kroah-Hartman ca923ef927 Merge branch 'work-next' into staging-next 2012-02-29 15:24:04 -08:00
Seth Jennings 041aba19b9 staging: zcache: fix memory corruption bug
This patch fixes a bug where the zv code writes before the allocated
buffer, resulting in system memory corruption. This was introduced
during the switch from xvmalloc to zsmalloc.

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-29 15:23:38 -08:00
Seth Jennings 843c666d16 staging: zcache: fix length type mismatch
This fixes a type mismatch in the compression code where
a size_t pointer was cast to a unsigned int pointer.  On
little endian archs, there is no issue.  However on big
endian archs, the value is incorrect, taking the high
order bits and truncating the lower order bits.

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-29 15:23:37 -08:00
Chris Kelly 0339d3dbbf staging: ozwpan: Reduced size of oz_evtlist structure.
This structure is used in an ioctl definition and was causing the
64-bit PowerPC build to fail. The size of the array in the structure
has been reduced to fix this.

Signed-off-by: Chris Kelly <ckelly@ozmodevices.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-29 15:23:37 -08:00
Paul Gortmaker 50af5ead3b bug.h: add include of it to various implicit C users
With bug.h currently living right in linux/kernel.h there
are files that use BUG_ON and friends but are not including
the header explicitly.  Fix them up so we can remove the
presence in kernel.h file.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2012-02-29 17:15:08 -05:00
Paul Gortmaker 13ae246db4 includecheck: delete any duplicate instances of module.h
Different tree maintainers picked up independently generated
trivial compile fixes based on linux-next testing, resulting
in some cases where a file would have got more than one addition
of module.h once everything was all merged together.

Delete any duplicates so includecheck isn't complaining about
anything related to module.h/export.h changes.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2012-02-28 19:31:56 -05:00
Greg Kroah-Hartman e42f85f3d4 USB: serial: serqt_usb2.c: use module_usb_serial_driver
This converts the serqt_usb2.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Bill Pemberton <wfp5p@virginia.edu>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-28 13:11:30 -08:00
Greg Kroah-Hartman f136e8b61c USB: serial: quatech_usb2.c: use module_usb_serial_driver
This converts the quatech_usb2.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Lucas De Marchi <lucas.demarchi@profusion.mobi>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-28 13:11:27 -08:00
Sebastian Andrzej Siewior 7ac4704c09 usb/storage: a couple defines from drivers/usb/storage/transport.h to include/linux/usb/storage.h
This moves the BOT data structures for CBW and CSW from drivers internal
header file to global include able file in include/.
The storage gadget is using the same name for CSW but a different for
CBW so I fix it up properly. The same goes for the ub driver and keucr
driver in staging.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-28 11:05:18 -08:00
Danny Kukawka 5d74f17570 Staging: wlags49_h2: print MAC via printk format specifier
Print MAC/dev_addr via printk extended format specifier %pM
instead of custom code.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
2012-02-24 15:41:41 -05:00
Danny Kukawka 3274ce71fe Staging: ft1000-pcmcia: print MAC via printk format specifier
Print MAC/dev_addr via printk extended format specifier %pM
instead of custom code.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
2012-02-24 15:41:31 -05:00
Alan Stern 69276a33bd usb-serial: use new registration API in staging drivers
This patch (as1530) modifies the following usb-serial drivers from
drivers/staging to utilize the new usb_serial_{de}register_drivers()
routines:

	quatech_usb2 and serqt_usb2.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 12:39:22 -08:00
Michael Hennerich cd4361c7e2 iio: core: constitfy available_scan_mask
The core must not modify available_scan_mask, because it causes problems
with drivers where multiple instances of the driver share the same mask set.
So make this explicit by marking available scan masks as const.

The max1363 driver needs some minor adjustment to accommodate this change.
Pull scan mask allocation into a separate function.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 12:14:04 -08:00
Lars-Peter Clausen 004d81339a staging:iio: Remove declaration for non existing function
The declaration for iio_buffer_deinit has been around for quite some time, but
the function itself has never been added. So remove the declaration.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 12:14:03 -08:00
Lars-Peter Clausen 64f4eaa5c3 staging:iio:dac:ad5064: Add AD5666 support
The AD5666 is identical to the ad5064-1, except that it has a internal reference
voltage.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 12:12:27 -08:00
Lars-Peter Clausen bb92ff3e54 staging:iio:dac:ad5064: Add AD5628/AD5648/AD5668 support
The AD5628/AD5648/AD5668 are similar to the AD5024/AD5044/AD5064. The difference
being that they have an internal reference voltage and 8 instead of 4 DAC
channels.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 12:12:26 -08:00
Lars-Peter Clausen f8be4af1f2 staging:iio:dac:ad5064: Add AD5025/AD5045/AD5065 support
The AD5025/AD5045/AD5065 are identical to the AD5024/AD5044/AD5064 except that
they have 2 instead of 4 DAC channels.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 12:12:25 -08:00
Lars-Peter Clausen 83c169d57e staging:iio:dac:ad5064: Prepare driver for the addition of chip variants
Prepare the driver for the addition of chip variants with a different number of
channels. This is done by not hard-coding the number of channels, but instead
add a field to the chip info struct holding the number of channels. Also do not
embed the channel specs into the chip info, but rather store them independently.
This allows sharing the same channel spec between different chip infos.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 12:12:25 -08:00
Lars-Peter Clausen 1d0d879405 staging:iio:dac:ad5064: Convert to extended channel info attributes
Use extended channel info attributes for the powerdown, powerdown_mode and
powerdown_mode_available attributes.

Note that this patch moves the chip info defintion around to avoid having to use
forward declarations for the extended channel info attributes callbacks.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 12:12:25 -08:00
Lars-Peter Clausen 5f420b4207 staging:iio: Add extended IIO channel info
Sometimes devices have per channel properties which either do not map nicely to
the current channel info scheme (e.g. string properties) or are very device
specific, so it does not make sense to add generic support for them.

Currently drivers define these attributes by hand for each channel. Depending on
the number of channels this can amount to quite a few lines of boilerplate code.
Especially if a driver supports multiple variations of a chip with different
numbers of channels. In this case it becomes necessary to have a individual
attribute list per chip variation and also a individual iio_info struct.

This patch introduces a new scheme for handling such per channel attributes
called extended channel info attributes. A extended channel info attribute
consist of a name, a flag whether it is shared and read and write callbacks.
The read and write callbacks are similar to the {read,write}_raw callbacks and
take a IIO device and a channel as their first parameters, but instead of
pre-parsed integer values they directly get passed the raw string value, which
has been written to the sysfs file.

It is possible to assign a list of extended channel info attributes to a
channel. For each extended channel info attribute the IIO core will create a new
sysfs attribute conforming to the IIO channel naming spec for the channels type,
similar as for normal info attributes. Read and write access to this sysfs
attribute will be redirected to the extended channel info attributes read and
write callbacks.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 12:12:24 -08:00
Lars-Peter Clausen 519ff1d287 staging:iio: Convert remaining drivers to module_spi_driver
Convert the IIO drivers which have not been converted yet to module_spi_driver.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 12:11:13 -08:00
Lars-Peter Clausen 01788c533a staging:iio: Use dev_pm_ops
Use dev_pm_ops instead of legacy suspend/resume callbacks for IIO drivers.

Note that this patch introduces a few new #ifdef CONFIG_PM_SLEEP around the
suspend and resume callbacks to avoid warnings of unused functions if
CONFIG_PM_SLEEP is not defined.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 12:11:13 -08:00
Jonathan Cameron 4eeb3335bb staging:iio:Documentation in kernel pull description.
Very basic description of the way iio consumers work and how to use
this functionality.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 12:10:04 -08:00
Jonathan Cameron e0f8a24e0e staging:iio::hwmon interface client driver.
Direct copy of version proposed for the non staging branch.
Needed here to allow testing of more advanced inkernel
interface code.

Minimal support of simple in, curr and temp attributes
so far.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 12:10:03 -08:00
Jonathan Cameron ad2c08b620 staging:iio: move iio data return types into types.h for use by inkern
In kernel interfaces need these, so make them available.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 12:10:03 -08:00
Jonathan Cameron e27d75d71c staging:iio:core add in kernel interface mapping and getting IIO channels.
Lifted from proposal for in kernel interface built on the out of staging
branch.

Two elements here:
* Map as defined in "inkern.h"
* Matching code to actually get the iio_dev and channel
that we want from the global list of IIO devices.
V4: Everything now built if iio is built (rather than being optional)
    Removal race condition prevented by using info pointer as a check
    of removal under a lock.
V3: Drop the option of registering / getting channels using dev pointer.
Stick to name only as suggested by Mark Brown (this has caused user
confusion in the regulator framework.)
V2: As per Greg KH suggestion, move over to registration by passing
the tables into the provider drivers (how regulator does it).
This does not prevent us using the original more flexible approach
if at a later date there is a usecase that demands it.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 12:10:02 -08:00
Jonathan Cameron ac917a8111 staging:iio:core set the iio_dev.info pointer to null on unregister under lock.
This prevents use of provider callbacks after it has been unregistered.
Note that all code using this that can be called from a consumer *must*
check the pointer before using and hold the info_exist_lock throughout
the usage of the callbacks in info.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 12:10:02 -08:00
Omar Ramirez Luna 08cd9ef4ec staging: tidspbridge: detect wdt3 feature at runtime
In order to detect WDT feature on the dsp code, we need to
find the symbol used to enable it inside the baseimage.

This should fix the warning comming from L3 driver:

    WARNING: at arch/arm/mach-omap2/omap_l3_smx.c:161 omap3_l3_app_irq...
    In-band Error seen by IVA_SS  at address 0
    ...

That occurs because the dsp tries to access wdt3 registers when the clock
for those registers is not enabled.

Reported-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 12:05:38 -08:00
Omar Ramirez Luna 18db4fe098 staging: tidspbridge: always compile dsp wdt code
In order to detect it at runtime, we need the code handling wdt
clock available at runtime to decide whether to enable or disable
based on the baseimage symbols. Default timeout has been set to 5
seconds.

Downside is that we will lose the option to set a custom timeout
for overflow, but than can be added (if needed) as part of debugfs.

Signed-off-by: Omar Ramirez <omar.ramirez@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 12:05:38 -08:00
Masanari Iida 81a149561e staging: Fix typo in unioxx5.c
Correct spelling "erorr" to "error" in
drivers/stating/comedi/drivers/unioxx5.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 12:05:38 -08:00
Masanari Iida 3e495b2104 staging: Fix typo in bssdb.c
Correct spelling "scaning" to "scanning" in
drivers/staging/vt6656/bssdb.c
drivers/staging/vt6655/bssdb.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 12:05:37 -08:00
David Daney b5c19ca801 staging/octeon: Fix PHY binding in octeon-ethernet driver.
Commit d6c25be (mdio-octeon: use an unique MDIO bus name.) changed the
names used to refer to MDIO buses.  The ethernet driver must be
changed to match, so that the PHY drivers can be attached.

Signed-off-by: David Daney <david.daney@cavium.com>
Acked-by: Florian Fainelli <florian@openwrt.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 12:03:15 -08:00
Rabin Vincent 47de87a234 staging: logger: hold mutex while removing reader
The readers list is traversed under the log->mutex lock
(for example from fix_up_readers()), but the deletion of
elements from this list is not being done under this lock.

Cc: Brian Swetland <swetland@google.com>
Cc: Dima Zavin <dima@android.com>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 12:03:14 -08:00
Chris Ball 6f6c4dc040 staging: Update TODO for rts5139 and rts_pstor
These are each >20k LOC drivers that embed an entire SD stack, and present
SD cards as if they were SCSI devices; both drivers should be rewritten to
be small hooks that connect the PCI (for rts_pstor) or USB (for rts5139)
hardware into Linux's MMC/xD/memorystick stacks.

Signed-off-by: Chris Ball <cjb@laptop.org>
Cc: edwin_rong <edwin_rong@realsil.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 12:03:14 -08:00
Dan Carpenter 1ca1a92cc6 Staging: wlan-ng: memsetting the wrong amount of data
p80211item_pstr6_t is the size of "msg1.bssid" (16 bytes) but
msg1.bssid.data is type p80211pstr6_t and it is smaller (7 bytes).  We
had just set that memory to zeroes earlier and now we're writing over it
with 0xff because we're writing past the end of the struct.

I don't know if this actually causes a problem.  It may be that we
initialize the extra 0xff bytes correctly later.  But the current code
is obviously wrong and we should fix it.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 12:03:13 -08:00
Danny Kukawka d8aa3e26f4 Staging: et131x: unify return value of .ndo_set_mac_address if address is invalid
Unify return value of .ndo_set_mac_address if the given address
isn't valid. Return -EADDRNOTAVAIL as eth_mac_addr() already does
if is_valid_ether_addr() fails.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 12:03:13 -08:00
Hitoshi NAKAMORI 72a474b8cd Staging: frontier: Fix checkpatch.pl issue.
This is a patch to the alphatrack.c and tranzport.c  that fixes up an error
found by checkpatch.pl tool.

Signed-off-by: Hitoshi Nakamori <hitoshi.nakamori@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 12:03:12 -08:00
Justin P. Mattock ac399bc0f4 drivers:staging:et131x Fix some typo's in staging et131x.
The below patch fixes some comments with typos in the them and makes a comment make more sense.

 Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 12:03:11 -08:00
Andrea Righi cfbc6a9221 staging: zcache: avoid AB-BA deadlock condition
Commit 9256a47 fixed a deadlock condition, being sure that the buddy
list spinlock is always taken before the page spinlock.

However in zbud_free_and_delist() locking order is the opposite
(page lock -> list lock).

Possible unsafe locking scenario (reported by lockdep):

        CPU0                    CPU1
        ----                    ----
   lock(&(&zbpg->lock)->rlock);
                                lock(zbud_budlists_spinlock);
                                lock(&(&zbpg->lock)->rlock);
   lock(zbud_budlists_spinlock);

Fix by grabbing the locks in opposite order in zbud_free_and_delist().

Signed-off-by: Andrea Righi <andrea@betterlinux.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 11:59:59 -08:00
Mark Einon fc7e2a57e8 staging: et131x: use netif_rx_ni() for packet receive
netif_rx is meant to be called from interrupts because it doesn't wake
up ksoftirqd.  For calling from outside interrupts, netif_rx_ni exists.

This stops the error "NOHZ: local_softirq_panding 08" that happens on
some machines with NOHZ and plip --- it is caused by the fact that
softirq is pending and ksoftirqd is sleeping.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 11:59:59 -08:00
Dan Magenheimer 8062a62bda staging: ramster: Dont build ramster when CONFIGFS_FS=m
Ramster can't be a module (yet) and depends on CONFIGFS_FS=y, but
allmodconfig builds with CONFIGFS_FS=m, which breaks the build.
And forcing CONFIGFS_FS=y with select breaks the build in other ways.
So just don't build ramster unless CONFIGFS_FS=y.

Also, while we're here, add a comment as to why BROKEN is depended.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 11:59:58 -08:00
Dan Magenheimer cb532e4b2b staging: ramster: build ramster properly when CONFIG_OCFS2=m|y
Due to some conflicting debug vars, kernel build will warn when
CONFIG_RAMSTER=y and CONFIG_OCFS2=m and will fail when
CONFIG_RAMSTER=y and CONFIG_OCFS2=y (rare).

Rename ramster mlog vars to avoid the name conflict.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 11:59:58 -08:00
Sebastiaan de Haan aa8c2a0358 staging: wlan-ng: p80211netdev.c: fixed checkpatch error
New kernel developer inspired by the 2010 FOSDEM talk. Running checkpatch on
p80211netdev.c gave the error: p80211netdev.c:153: ERROR: "foo * bar" should
be "foo *bar". Fixed it by doing what was suggested.

Signed-off-by: Sebastiaan de Haan <sebastiaan@sebastiaandehaan.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 11:59:57 -08:00
Santosh Nayak ea50a5da79 Staging: usbip: Remove commented code.
Remove commented code of old style lock initilization

Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 11:59:57 -08:00
Tomas Winkler 63319ba2d5 staging/mei: mei-amt-version - make all function static and used
This patch eliminates following type of warnings
warning: no previous prototype for '...func...' [-Wmissing-prototypes]

For this is a single file example lets make all API-like functions
be static.
Since all static functions should be used so let's call
to amt_host_if_deinit() even if in this example it's not really necessary

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 11:59:56 -08:00
Tomas Winkler 4b00706cd9 staging/mei: fix hbm_host_version_response structure
Looks during cleanup we converted type of host_version_supported
member from UINT8 into int instead of u8.
Since we've queried only for boolean value of
this variable the bug wasn't really visible.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 11:59:56 -08:00
Kevin McKinney adc4a3a4b0 Staging: bcm: fix possible NULL dereference of psfLocalSet in CmHost.c
Variable psfLocalSet may not follow the correct
path in the code, and therefore may not be set
properly. As such, causing a null dereference.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 11:53:10 -08:00
Jorgyano Vieira eb6cfa5b74 Staging: crystalhd: Get rid of unecessary BCMLOG_ENTER macro
The BCMLOG_ENTER macro is used only in five functions, perhaps
it is remainder of debugging some specific problem,
now, this macro don't seems to be useful, so it should be removed.

Signed-off-by: Jorgyano Vieira <jorgyano@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 11:53:10 -08:00
Jorgyano Vieira 15fd62bec4 Staging: crystalhd: crystalhd_misc: Get rid of unused macro
The BCMLOG_LEAVE macro is not used, so there is no reason to keep it.

Signed-off-by: Jorgyano Vieira <jorgyano@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 11:53:09 -08:00
Chris Kelly b0406db5b3 staging: ozwpan: Plumbed in Kconfig and Kbuild
Added Kconfig and Kbuild files for ozwpan USB over WiFi driver.
Modified parent Makefile and Kconfig to include them.

Signed-off-by: Chris Kelly <ckelly@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 09:29:24 -08:00
Chris Kelly 066b222941 staging: ozwpan: Added debug support
Added tracing facilities and also memory allocation and URB tracking.
This is for debugging purposes and is all optional and can be switched
out at compile time.

Signed-off-by: Chris Kelly <ckelly@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 09:26:52 -08:00
Chris Kelly 56ff32fe1c staging: ozwpan: Added event logging support
The event logging subsystem allows internal events in the driver to
be logged. This facilitates testing the correct operation of the
driver. This subsystem is optional and can be switched out at
compile time.

Signed-off-by: Chris Kelly <ckelly@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 09:26:52 -08:00
Chris Kelly 23af8c2a08 staging: ozwpan: Added character device support
The character device provides a management interface to the driver
and also provides an additional service to the protocol for side
band communication with the device.

Signed-off-by: Chris Kelly <ckelly@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 09:26:51 -08:00
Chris Kelly b3147863b5 staging: ozwpan: Added USB service to protocol
The L2 protocol supports various services, one of which is USB.
This provides the implementation of that service and plumbs it to
the virtual USB HCD.

Signed-off-by: Chris Kelly <ckelly@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 09:26:51 -08:00
Chris Kelly ae926051d7 staging: ozwpan: Added USB HCD implementation
Added the implementation of the virtual USB HCD that is used to
present devices connected via the network to the USB subsystem.

Signed-off-by: Chris Kelly <ckelly@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 09:26:51 -08:00
Chris Kelly bc3157dde3 staging: ozwpan: Added device state support
Added support for maintaining state and data buffering for devices
connected via the network.

Signed-off-by: Chris Kelly <ckelly@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 09:26:51 -08:00
Chris Kelly 1619cb6f2d staging: ozwpan: Added basic L2 protocol support
Added the basic implementation of the L2 protocol support used to
communicate with devices over the network.

Signed-off-by: Chris Kelly <ckelly@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 09:26:50 -08:00
Chris Kelly 62450bca86 staging: ozwpan: Added driver entry code
This series of patches adds the Ozmo USB over WiFi driver to the
driver staging directory. This is a driver for a virtual USB HCD
and uses an L2 network protocol to talk to the device.
This patch adds the driver entry code and a README file with more
details.

Signed-off-by: Chris Kelly <ckelly@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 09:26:50 -08:00
David Howells 189017c25c fs: Remove missed ->fds_bits from cessation use of fd_set structs internally
Stephen Rothwell reported that the following commit broke the
linux-next build:

  1fd36adcd9: Replace the fd_sets in struct fdtable with an array of unsigned longs

Fix places where ->fds_bits needed to be removed as the core
kernel no longer uses fd_set internally for file descriptor
table management.  There are two places:

 (1) drivers/staging/android/binder.c

 (2) arch/mips/kernel/kspd.c

     Question: Should sp_cleanup() in the MIPS arch be using find_next_bit()
     or fls()?

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Ralf Bächle <ralf@linux-mips.org>
cc: Arve Hjønnevåg <arve@android.com>
Link: http://lkml.kernel.org/r/20120224105707.32170.11550.stgit@warthog.procyon.org.uk
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2012-02-24 14:04:50 +01:00
Danny Kukawka 8abe6fb51e Staging: et131x: unify return value of .ndo_set_mac_address if address is invalid
Unify return value of .ndo_set_mac_address if the given address
isn't valid. Return -EADDRNOTAVAIL as eth_mac_addr() already does
if is_valid_ether_addr() fails.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-23 17:11:39 -05:00
David Howells 1dce27c5aa Wrap accesses to the fd_sets in struct fdtable
Wrap accesses to the fd_sets in struct fdtable (for recording open files and
close-on-exec flags) so that we can move away from using fd_sets since we
abuse the fd_set structs by not allocating the full-sized structure under
normal circumstances and by non-core code looking at the internals of the
fd_sets.

The first abuse means that use of FD_ZERO() on these fd_sets is not permitted,
since that cannot be told about their abnormal lengths.

This introduces six wrapper functions for setting, clearing and testing
close-on-exec flags and fd-is-open flags:

	void __set_close_on_exec(int fd, struct fdtable *fdt);
	void __clear_close_on_exec(int fd, struct fdtable *fdt);
	bool close_on_exec(int fd, const struct fdtable *fdt);
	void __set_open_fd(int fd, struct fdtable *fdt);
	void __clear_open_fd(int fd, struct fdtable *fdt);
	bool fd_is_open(int fd, const struct fdtable *fdt);

Note that I've prepended '__' to the names of the set/clear functions because
they require the caller to hold a lock to use them.

Note also that I haven't added wrappers for looking behind the scenes at the
the array.  Possibly that should exist too.

Signed-off-by: David Howells <dhowells@redhat.com>
Link: http://lkml.kernel.org/r/20120216174942.23314.1364.stgit@warthog.procyon.org.uk
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
2012-02-19 10:30:52 -08:00
Greg Kroah-Hartman 3e809144ef Staging: ramster: mark BROKEN
It can't seem to build properly, so let's just mark it broken until
stuff sorts itself out.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-16 16:19:53 -08:00
Danny Kukawka 75f9209069 Staging: sm7xx/smtcfb.c included linux/module.h twice
drivers/staging/sm7xx/smtcfb.c included 'linux/module.h' twice,
remove the duplicate.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-15 17:21:43 -08:00
Jesper Juhl 337503431a Staging, rtl8192e, softmac: remove redundant memset and fix mem leak
In drivers/staging/rtl8192e/rtllib_softmac.c::rtllib_rx_assoc_resp()
we allocate memory for 'network' with kzalloc() and then proceed to
zero the already zeroed mem we got from kzalloc() with
memset(). That's redundant, so remove the memset()

We also fail to kfree() the memory we allocated for 'network' if we do not enter

  if (ieee->current_network.qos_data.supported == 1) {

and the variable then goes out of scope.

To fix that I simply moved the kfree() that was inside that 'if'
statement to instead be just after it. It then covers both the case
where we take the branch and when we don't.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-15 17:21:43 -08:00
Roland Stigge 906ecf69ad staging: iio: LPC32xx: ADC driver
This patch adds a 3-channel ADC driver for the LPC32xx ARM SoC

Signed-off-by: Roland Stigge <stigge@antcom.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-15 17:21:43 -08:00
Jorgyano Vieira 413db8c1c7 Staging: crystalhd: crystalhd_misc: improved debug macros
Improvement of debug macros to ensure safe use on if/else statements.

Signed-off-by: Jorgyano Vieira <jorgyano@gmail.com>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-15 17:21:42 -08:00
Greg Kroah-Hartman 2140dc9ce7 staging: clean up Greg's email address in some TODO files
My old email address was in some TODO files, so this fixes that issue.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-15 14:45:40 -08:00
Dan Magenheimer 83bc7a7cd2 staging: ramster: ramster-specific new files
RAMster implements peer-to-peer transcendent memory, allowing a "cluster"
of kernels to dynamically pool their RAM.

This patch adds new files necessary for ramster support:  The file
ramster.h declares externs and some pampd bitfield manipulation.  The
file zcache.h declares some zcache functions that now must be accessed
from the ramster glue code.  The file r2net.c is the glue between zcache
and the messaging layer, providing routines called from zcache that
initiate messages, and routines that handle messages by calling zcache.
TODO explains future plans for merging.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-15 09:02:03 -08:00
Dan Magenheimer c89126eabb staging: ramster: ramster-specific changes to zcache/tmem
RAMster implements peer-to-peer transcendent memory, allowing a "cluster"
of kernels to dynamically pool their RAM.

This patch incorporates changes transforming zcache to work with
a remote store.

In tmem.[ch], new "repatriate" (provoke async get) and "localify" (handle
incoming data resulting from an async get) routines combine with a handful
of changes to existing pamops interfaces allow the generic tmem code
to support asynchronous operations.  Also, a new tmem_xhandle struct
groups together key information that must be passed to remote tmem stores.

Zcache-main.c is augmented with a large amount of ramster-specific code
to handle remote operations and "foreign" pages on both ends of the
"remotify" protocol.  New "foreign" pools are auto-created on demand.
A "selfshrinker" thread periodically repatriates remote persistent pages
when local memory conditions allow.  For certain operations, a queue is
necessary to guarantee strict ordering as out-of-order puts/flushes can
cause strange race conditions.  Pampd pointers now either point to local
memory OR describe a remote page; to allow the same 64-bits to describe
either, the LSB is used to differentiate.  Some acrobatics must be performed
to ensure local memory is available to handle a remote persistent get,
or deal with the data directly anyway if the malloc failed.  Lots
of ramster-specific statistics are available via sysfs.

Note: Some debug ifdefs left in for now.
Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-15 09:02:03 -08:00
Dan Magenheimer b95e141a64 staging: ramster: xvmalloc allocation files
RAMster implements peer-to-peer transcendent memory, allowing a "cluster"
of kernels to dynamically pool their RAM.

Zcache is in the process of converting allocators, from xvmalloc to zsmalloc.
Further, RAMster V5 testing to date has been done only with xvmalloc.
To avoid merging problems, a linux-3.2 copy of xvmalloc is incorporated by
this patch.  Later patches will be able to eliminate xvmalloc and use zsmalloc.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-15 09:02:03 -08:00
Dan Magenheimer 19ee3ef5f4 staging: ramster: local compression + tmem
RAMster implements peer-to-peer transcendent memory, allowing a "cluster"
of kernels to dynamically pool their RAM.

This patch copies files from drivers/staging/zcache.  RAMster compresses
pages locally before transmitting them to another node, so we can
leverage the zcache and tmem code directly.  Note: there are
no ramster-specific changes yet to these files.

(Why copy?  The ramster tmem.c/tmem.h changes are definitely shareable
between zcache and ramster; the eventual destination for tmem.c
is the linux lib directory.  Ramster changes to zcache are more substantial
and zcache is currently undergoing some significant unrelated changes
(including a new allocator and breaking zcache-main.c into smaller files),
so it seemed best to branch temporarily and merge later.)

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-15 09:02:03 -08:00
Dan Magenheimer b605c9621e staging: ramster: cluster/messaging foundation
RAMster implements peer-to-peer transcendent memory, allowing a "cluster"
of kernels to dynamically pool their RAM.

This patch provides the cluster and messaging foundation for RAMster,
implementing the basic cluster discovery, mapping, heartbeat / keepalive,
and messaging ("r2net") that RAMster requires for internode communication.
This code heavily leverages code from the ocfs2 cluster layer but
has been extended, interfaces to userland changed, and external functions
renamed so that RAMster and ocfs2 can co-exist in the kernel and userland.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-15 09:02:03 -08:00
Dan Magenheimer 9a68e9a4c1 staging: ramster: enable as staging driver
RAMster implements peer-to-peer transcendent memory, allowing a "cluster"
of kernels to dynamically pool their RAM.

Enable build of ramster as a staging driver

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-15 09:02:02 -08:00
Omar Ramirez Luna 2573897816 staging: tidspbridge: fix bridge_open memory leaks
There are two members of pr_ctxt allocated during bridge_open that
are never freed resulting in memory leaks, these are stream_id and
node_id, they are now freed on release of the handle (bridge_release)
right before freeing pr_ctxt.

Error path for bridge_open was also fixed since the same variables
could result in memory leaking due to missing handling of failure
scenarios. While at it, the indentation changes were introduced to
avoid interleaved goto statements inside big if blocks.

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-14 15:38:51 -08:00
Kevin McKinney 00da8eddf9 Staging: bcm: Move directives for the preprocessor statement to enum value in led_control.h
DRIVER_HALT is a driver state that was originally
defined as a #define statement. This patch moves
it to the LedEvents type as an enumerated
value for the purpose of removing a compile time warning:

drivers/staging/bcm/led_control.c: In function ‘LEDControlThread’:
drivers/staging/bcm/led_control.c:817:3: warning: case value ‘255’ not in enumerated type ‘LedEventInfo_t’ [-Wswitch]

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-13 20:16:14 -08:00
Nitin Gupta 5fa5a90116 staging: zram: Rename module parameter
zram accepts number of devices to be created
as a module parameter. This was renamed from
num_devices to zram_num_devices (without updating
the documentation!) since num_devices was declared
as a non-static global variable, polluting the global
namespace. Now, we declare it as a static variable
and revert back the name change.

The documentation (zram.txt) already mentions
num_devices as the module parameter name.

Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-13 20:11:54 -08:00
Lars-Peter Clausen 7042122fe5 staging:iio: Add event monitor example application
Add a small evtest like application to monitor events generated by an IIO
device. The application can be used as an example on how to listen for IIO
events and also is usful for testing and debugging device drivers which
generate IIO events.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-13 20:10:32 -08:00
Lars-Peter Clausen f30f929fcd staging:iio: Add missing event code extract macros
Add macros for extracting whether the event is for a differential channel and
the second channel number from the event code. These were the only two fields
which did not have such an macro yet.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-13 20:10:32 -08:00
Lars-Peter Clausen da36716042 staging:iio: Rename IIO_EVENT_CODE_EXTRACT_NUM to IIO_EVENT_CODE_EXTRACT_CHAN
We name this field "chan" throughout IIO with the exception of this one macro.
Rename it to be more consistent.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-13 20:10:32 -08:00
Lars-Peter Clausen 6da507bcbd staging:iio:events: Remove obsolete documentation
Commit 43ba1100 ("staging:iio:events: Use waitqueue lock to protect event
queue") removed the event_list_lock field from the iio_event_interface struct,
but missed to remove the same field from the documentation for that function.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-13 20:10:32 -08:00
Josenivaldo Benito Jr 72ed116fe6 Staging: sm7xx: smtcfb.h: fix sparse error
Declaration between .h and .c was mismatched. Matched both declara
tions avoiding an sparse check error.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-13 20:09:38 -08:00
Josenivaldo Benito Jr c8100d2b18 Staging: sm7xx: smtcfb.c: fixed a pointer declaration coding style
Fixed a pointer declaration coding style issue. *foo not * foo

Signed-off-by: Josenivaldo Benito Jr. <jrbenito@benito.qsl.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-13 20:09:38 -08:00
Axel Lin 09f993e684 staging:iio:dac: Fix kcalloc parameters swapped
The first parameter should be "number of elements" and the second parameter
should be "element size".

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-13 20:09:38 -08:00
Szymon Janc 5f01f7f301 Staging: quickstart: Fix compilation warning on 64 bit arch
acpi_size is u32 or u64 depending on architecture. Cast it to
unsigned long and use %lu for printing.

This fix following build warning:
drivers/staging/quickstart/quickstart.c: In function ‘quickstart_acpi_ghid’:
drivers/staging/quickstart/quickstart.c:212:5: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 3 has type ‘acpi_size’ [-Wformat]

Signed-off-by: Szymon Janc <szymon@janc.net.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-13 20:08:56 -08:00
Szymon Janc af5728e08a Staging: quickstart: Bump driver version to 1.04
Signed-off-by: Szymon Janc <szymon@janc.net.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-13 20:08:55 -08:00
Szymon Janc e66912af2c Staging: quickstart: Use scnprintf in quickstart_pressed_button_show
Use scnprintf instead of snprintf in quickstart_pressed_button_show as
suggested in Documentation/filesystems/sysfs.txt.

Signed-off-by: Szymon Janc <szymon@janc.net.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-13 20:08:55 -08:00
David Rientjes 940f77b07f staging: android, lowmemorykiller: convert to use oom_score_adj
/proc/pid/oom_adj is deprecated and will be removed in August 2012
according to Documentation/feature-removal-schedule.txt.  Convert its
usage in the lowmemorykiller to use the new interface, oom_score_adj,
instead.

Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-13 20:03:42 -08:00
Alan Cox ebb3bf5018 staging: Fix SEP build
SEP build fails if crypto is not selected.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-13 14:42:02 -08:00
K. Y. Srinivasan 89ae7d7093 Staging: hv: storvsc: Move the storage driver out of the staging area
The storage driver (storvsc_drv.c) handles all block storage devices
assigned to Linux guests hosted on Hyper-V. This driver has been in the
staging tree for a while and this patch moves it out of the staging area.

James was willing to apply this patch during the 3.3-rc phase and a decision
was taken to defer this to 3.4 since Greg had queued up a bunch of storvsc
patches for 3.4. Now that Greg has applied all of the pending storvsc patches,
I am sending this patch to move this driver out of staging. Based on James'
recommendation, this patch gets rid of the unneeded files in the staging/hv
directory.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Acked-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-13 11:35:20 -08:00
Seth Jennings 0cbb613fa8 staging: fix powerpc linux-next break on zsmalloc
linux/vmalloc.h added to zsmalloc-main.c to resolve implicit
declaration errors.

X86 dependency added to zsmalloc and dependent drivers zcache and zram.

This X86 only requirement is not ideal.  Working to find portable
functions for __flush_tlb_one and set_pte.

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-13 06:57:17 -08:00
Greg Kroah-Hartman b91867f2ee Merge tag 'staging-3.3-rc3' into staging-next
This was done to resolve some merge issues with the following files that
had changed in both branches:
	drivers/staging/rtl8712/rtl871x_sta_mgt.c
	drivers/staging/tidspbridge/rmgr/drv_interface.c
	drivers/staging/zcache/zcache-main.c

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10 10:58:25 -08:00
Mark A. Allyn 9196dc1129 staging: sep: reworked crypto layer
This gets the SEP crypto layer up and running with things like dmcrypt.
It's a fairly big set of changes because it has to rework the whole context
handling system.

[This is picked out of the differences between the upstream driver and
 the staging driver. I'm resolving the differences as a series of updates -AC]

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10 10:09:58 -08:00
Mark A. Allyn ab8ef35131 staging: sep: NULL out pointers, mark debug code DEBUG to fix warnings
[This is picked out of the differences between the upstream driver and
 the staging driver. I'm resolving the differences as a series of updates -AC]

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10 10:09:58 -08:00
Mark A. Allyn ecd0cb003f staging: sep: update initialisation
In particular we want to always do the reconfigure

[This is picked out of the differences between the upstream driver and
 the staging driver. I'm resolving the differences as a series of updates -AC]

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10 10:09:57 -08:00
Mark A. Allyn 6ab80c2608 staging: sep: Add interfaces for the new functions
[This is picked out of the differences between the upstream driver and
 the staging driver. I'm resolving the differences as a series of updates -AC]

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10 10:09:57 -08:00
Mark A. Allyn aca58ec828 staging: sep: Basic infrastructure for SEP DMA access to non CPU regions
[This is picked out of the differences between the upstream driver and
 the staging driver. I'm resolving the differences as a series of updates -AC]

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10 10:09:57 -08:00
Mark A. Allyn ffcf12810c staging: sep: Add new PCI identifier
[This is picked out of the differences between the upstream driver and
 the staging driver. I'm resolving the differences as a series of updates -AC]

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10 10:09:56 -08:00
John Stultz 2157f89677 staging: android-alarm: Support old drivers via preprocessor aliasing
Older out of tree drivers that were desgined to the Android Alarm
in-kernel API may not build due to the namespace collision fixed in
an earlier patch. Per Arve's suggestion, this patch provides
preprocessor macros that allow older drivers to build.

CC: Arve Hjønnevåg <arve@android.com>
CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10 10:08:01 -08:00
John Stultz 7f9b98a39b staging: android-alarm: Fixup minor pr_alarm warnings
This patch fixes the following warnings:

drivers/staging/android/alarm.c: In function ‘alarm_timer_triggered’:
drivers/staging/android/alarm.c:344: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long int’
drivers/staging/android/alarm.c:367: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long int’

CC: Arve Hjønnevåg <arve@android.com>
CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10 10:08:01 -08:00
JP Abgrall f2d3c6898a staging: android-alarm: Fix bad index when canceling alarms[]
It was using ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP_MASK as an
index.

CC: Arve Hjønnevåg <arve@android.com>
CC: Android Kernel Team <kernel-team@android.com>
CC: JP Abgrall <jpa@google.com>
Change-Id: I919860cc71254453e382616bce9fd5455802cb3d
Signed-off-by: JP Abgrall <jpa@google.com>
[jstultz: Tweaked commit subject]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10 10:08:01 -08:00
Arve Hjønnevåg 66c4810771 staging: android-alarm: Update hrtimer if alarm at the head of the queue is reprogrammed
If an alarm was restarted with a value that moved it away from the head
of a queue, the hrtimer would not be updated. This would cause unnecessary
wakeups.

CC: Arve Hjønnevåg <arve@android.com>
CC: Android Kernel Team <kernel-team@android.com>
Change-Id: If379f8dd92b0bdb3173bd8d057adfe0dc1d15259
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10 10:08:00 -08:00
Praneeth Kumar Bajjuri 58a38ff3b1 staging: android-alarm: Disable Android alarm driver by default
Do not enable Android alarm driver by default

CC: Arve Hjønnevåg <arve@android.com>
CC: Android Kernel Team <kernel-team@android.com>
CC: Praneeth Bajjuri <praneeth@ti.com>
Change-Id: Iff8f7a65c4eceecfd084074937c72824697b5e7f
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
[jstultz: tweaked commit subject & msg]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10 10:08:00 -08:00
John Stultz fe8d2727ff staging: android-alarm: Reenable android alarm driver
Now that it builds, re-enable android alarm driver in
the makefile and kconfig

CC: Arve Hjønnevåg <arve@android.com>
CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10 10:06:43 -08:00
John Stultz 79ef07162f staging: android-alarm: HACK: wakelock workaround
Allow Android alarmtimer device to build while wakelocks are still
out of tree.

CC: Arve Hjønnevåg <arve@android.com>
CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10 10:06:19 -08:00
John Stultz f2f28eacf2 staging: android-alarm: Fix namespace collision with upstreamed alarmtimers
The upstreamed alarmtimers are similar but not quite 100% API
compatibile with the android in-kernel alarm api. To aid the
transition, prefix the the android in-kernel api with android_

CC: Arve Hjønnevåg <arve@android.com>
CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10 10:06:19 -08:00
John Stultz d47908b20c staging: android-alarm: Fix include compile issues
The file asm/mach/time.h doesn't exist on all arches,
so include <linux/time.h>. Also linux/sysdev.h is gone
so kill it.

CC: Arve Hjønnevåg <arve@android.com>
CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10 10:06:19 -08:00
Andy Green bf647ea717 staging: android-alarm: Add needed module.h includes
Add module.h includes required to build

CC: Arve Hjønnevåg <arve@android.com>
CC: Android Kernel Team <kernel-team@android.com>
CC: Andy Green <andy.green@linaro.org>
Signed-off-by: Andy Green <andy.green@linaro.org>
[jstultz: Tweaked commit subject, folded two patches
into one]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10 10:06:18 -08:00
Arve Hjønnevåg 5dd12c29b4 staging: android-alarm: Don't use save_time_delta.
Remove references to non-existant save_time_delta.

Change-Id: Iaefeca497de02fe36b7f5d79075912f6e349ec53
CC: Arve Hjønnevåg <arve@android.com>
CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Arve Hjønnevåg <arve@android.com>
[Added commit message -jstultz]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10 10:06:18 -08:00
Arve Hjønnevåg 841cb11c6f staging: android-alarm: Add android alarm driver & in-kernel alarm interface
Drivers can now create alarms that will use an hrtimer while the
system is running and the rtc to wake up from suspend.

CC: Arve Hjønnevåg <arve@android.com>
CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Arve Hjønnevåg <arve@android.com>
[Fold and move alarm driver and interface to staging,
 fix whitespace issue, drop kconfig & make file changes
 as it currently doesn't build  -jstultz]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10 10:05:42 -08:00
Gerard Ryan 242501ce5d Staging: bcm: fix CodingStyle warnings/errors reported by checkpatch.pl in led_control.h
This is a patch to the led_control.h file that fixes numerous warnings
and errors reported by the checkpatch.pl tool. There still remain a few
more, but as this is my first attempt at a commit, I'm not going to be
too adventurous!

Signed-off-by: Gerard Ryan <gerard@ryan.lt>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10 09:58:52 -08:00
Larry Finger 073863432f staging: r8712u: Add missing initialization and remove configuration parameter CONFIG_R8712_AP
When this driver was upgraded to the vendor 20100831 version in
commit 93c55dda09 et al,, one listhead initialization was missed.
This broke complete operation of the driver whenever AP mode was
enabled. This fixes https://bugs.archlinux.org/task/27996.

The configuration parameter R8712_AP is misleading as the driver cannot
function as an AP without a heavily hacked version of hostapd. Thus, it
makes sense to remove the parameter; however the code and data configured
for the option is left in.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10 09:57:28 -08:00
Peter Huewe c3b3b3f9b0 staging/xgifb: remove remaining duplicate initdef.h defines
This patch removes the remaining defines that are already defined
identically in the sis initdef.h header.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10 09:56:25 -08:00
Peter Huewe ccc8cb25ae staging/xgifb: Use TVCLKBASE_315 as a base address
Since the defines TVVCLKDIV2, TVVCLK, HiTVVCLKDIV2, HiTVVCLK,
HiTVSimuVCLK and HiTVTextVCLK are now defined as relative values, we
have to use TVCLKBASE_315 (0x31) as a base address to get the same values
as before the merge.

The old and now duplicated defines were removed

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10 09:56:24 -08:00
Peter Huewe a3d675c88f staging/xgifb: Rename XGI specific initdef.h defines
This patch renames some of the defines that exist in the sis initdef.h
but seem to have a different value.
In order to preserve the functionality of the driver, we simply prepend
these defines with XGI_ (for now) to resolve conflicts and review them
later on.

Renames:
SetCRT2ToLCDA -> XGI_SetCRT2ToLCDA
LCDVESATiming -> XGI_LCDVESATiming
EnableLVDSDDA -> XGI_EnableLVDSDDA
LCDDualLink  -> XGI_LCDDualLink
ModeSwitchStatus  -> XGI_ModeSwitchStatus
YPbPr750pVCLK  -> XGI_YPbPr750pVCLK

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10 09:56:24 -08:00
Peter Huewe 6896b94e24 staging/xgifb: Rename remaining sis initdef.h defines and remove duplicates
This patch renames the remaining duplicate defines and their usage to
the naming convention of the sis initdef.h and removes the now duplicated
defines.

Renames:
CRT2DisplayFlag -> DisableCRT2Display
ModeInfoFlag -> ModeTypeMask

Support16Bpp -> Mode16Bpp
Support32Bpp -> Mode32Bpp

SupportHiVisionTV -> SupportHiVision
SupportYPbPr -> SupportYPbPr750p
SwitchToCRT2 -> SwitchCRT2

VB_XGI301 -> VB_SIS301
VB_XGI301B -> VB_SIS301B
VB_XGI301LV -> VB_SIS301LV
VB_XGI302B -> VB_SIS302B
VB_XGI302LV -> VB_SIS302LV
VB_YPbPr525p -> YPbPr525p
VB_YPbPr750p -> YPbPr750p

VCLK108_2 -> VCLK108_2_315
VCLK65 -> VCLK65_315

XGI_CRT2_PORT_04 -> SIS_CRT2_PORT_04
XGI_CRT2_PORT_10 -> SIS_CRT2_PORT_10
XGI_CRT2_PORT_12 -> SIS_CRT2_PORT_12
XGI_CRT2_PORT_14 -> SIS_CRT2_PORT_14

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10 09:56:24 -08:00
Peter Huewe 599801f926 staging/xgifb: Rename Set* defines and remove duplicated defines
This patch renames the Set* defines and their usage to the naming
convention of the sis initdef.h and removes the now duplicated defines.

Renames:
SetCRT2ToHiVisionTV -> SetCRT2ToHiVision
SetCRT2ToYPbPr -> SetCRT2ToYPbPr525750

SetNTSCJ -> TVSetNTSCJ
SetPALMTV -> TVSetPALM
SetPALNTV -> TVSetPALN
SetPALTV -> TVSetPAL

SetYPbPrMode1080i -> TVSetHiVision
SetYPbPrMode525i -> TVSetYPbPr525i
SetYPbPrMode525p -> TVSetYPbPr525p
SetYPbPrMode750p -> TVSetYPbPr750p

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10 09:56:23 -08:00
Peter Huewe 255aabd2b8 staging/xgifb: Rename panel defines and remove duplicated defines
This patch renames the Panel* defines and their usage to the naming
convention of the sis initdef.h and removes the now duplicated defines.

Renames:
Panel320x480 -> Panel_320x480
Panel800x600 -> Panel_800x600
Panel1024x768 -> Panel_1024x768
Panel1024x768x75 -> Panel_1024x768x75
Panel1280x1024 -> Panel_1280x1024
Panel1280x1024x75 -> Panel_1280x1024x75
Panel1280x960 -> Panel_1280x960
Panel1400x1050 -> Panel_1400x1050
Panel1600x1200 -> Panel_1600x1200

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10 09:56:22 -08:00
Peter Huewe 84359ef62a staging/xgifb: Include sis initdef.h header
This patch includes the initdef.h header from the sis driver.
Since the xgi driver used to redefine a lot of stuff from the sis
driver, we can simply include the headers of the sis driver itself, so
we can remove duplicated stuff later on.

In order to include the initdef.h we have to rename the header guards.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10 09:56:21 -08:00
Greg Kroah-Hartman c123daaad8 staging: ramster: delete the driver
Turns out it's not quite ready to be included, thanks to some other work
done in the zcache and zram code, which breaks this driver.

So, delete it for now, per the recommendation of Dan.

Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10 09:45:22 -08:00
Jesper Juhl 8cd7c62e13 Staging: The header linux/module.h is included twice in drivers/staging/iio/dac/ad5686.c
Remove the unneeded duplicate.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-02-10 09:52:19 +01:00
Seth Jennings a49aeb1de5 staging: zcache: replace xvmalloc with zsmalloc
Replaces xvmalloc with zsmalloc as the persistent memory allocator
for zcache

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 10:47:58 -08:00
Seth Jennings 72a9826b45 staging: zcache: fix serialization bug in zv stats
In a multithreaded workload, the zv_curr_dist_counts
and zv_cumul_dist_counts statistics are being corrupted
because the increments and decrements in zv_create
and zv_free are not atomic.

This patch converts these statistics and their corresponding
increments/decrements/reads to atomic operations.

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 10:47:58 -08:00
Jonathan Cameron 8f9cde23c3 staging:iio:adc:adt7310/7410 sticking plaster fix for broken event attrs.
Neither of these drivers has ever been anywhere near the iio abi.
Probably as a result of this the fact they had two event groups
each was not picked up when we restricted IIO to having only
1 event line per device (as part of the chrdev merge set).

As such these definitely didn't work before.  This patch squishes
the only element from the 'comparator' event line that isn't in the
'interrupt' one into it and kills off the 'comparator' one.

Ultimately both of these drivers belong in hwmon not IIO and are just
waiting here because I don't want to kill off a driver that may
prove useful to someone.  (Ultimately I will ask Greg to scrap
these two if no one steps up to deal with them.)

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 10:06:06 -08:00
Jonathan Cameron 9214cc6e13 staging:iio:adc:ad7606 unwind use of is_visible for attrs.
This is the most controversial of this set of is_visible removals.
There are two conditions controlling availability of attrs resulting
in 4 different attribute groups.

Still for a few more lines things are clearer to read to my mind.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 10:06:05 -08:00
Jonathan Cameron 7389266cc9 staging:iio:dac:ad5446 unwind use of is_visible for attrs.
Trivial case where no attributes are valid for some parts. Better
handled using two iio_info structures and selecting the right one
at probe time.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 10:06:05 -08:00
Jonathan Cameron b2c04a34aa staging:iio:dds:ad9834 unwind use of is_visible for attrs.
Trivial usecase in which just having two different attr
groups covers all options.  Slightly more code, but a simpler
to follow result.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 10:06:05 -08:00
Jonathan Cameron 15bbb7793a staging:iio:adc:ad7192 unwind use of is_visible for attribute group.
It saves a couple of lines of code but reduces simplicity of code.
I generally wish to discourage use of is_visible throughout IIO.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 10:06:04 -08:00
Lars-Peter Clausen a046c1e866 staging:iio:events: Use non-atmoic bitops
We always hold the waitqueue lock when modifying the flags field. So it is safe
to use the non-atomic bitops here instead of the atomic versions.

The lock has to be held, because we need to clear the busy flag and flush the
event FIFO in one atomic operation when closing the event file descriptor.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 10:05:07 -08:00
Lars-Peter Clausen e18045ed75 staging:iio:events: Add poll support
Add poll support to the event queue. This will allow us to check for pending
events in a application's event loop using poll() or similar. Since we already
have support for blocking reads adding poll support as well is trivial.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 10:05:06 -08:00
Lars-Peter Clausen 43ba1100af staging:iio:events: Use waitqueue lock to protect event queue
Use the waitqueue lock to protect the event queue instead of a custom mutex.
This has the advantage that we can call the waitqueue operations with the lock
held, which simplifies the code flow a bit.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 10:05:06 -08:00
Lars-Peter Clausen 2c00193fa1 staging:iio:events: Use kfifo for event queue
The current IIO event code uses a list to emulate FIFO like behavior.
Just use a kfifo directly instead to implement the event queue. As part of this
patch the maximum of events in the queue is increased from 10 to 16 since kfifo
requires a power of two for the number of FIFO elements.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 10:05:06 -08:00
Lars-Peter Clausen 0a769a9533 staging:iio: Factor out event handling into its own file
The core iio file has gotten quite cluttered over time. This patch moves
the event handling code into its own file. Since the event handling code is
largely independent from the core code the only code changes necessary for
this are to make the moved iio_device_register_eventset,
iio_device_unregister_eventset and iio_event_getfd functions non static.

This has also the advantage that industrialio-core.c is now closer again to
its counterpart in the outofstaging branch.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 10:05:06 -08:00
Lars-Peter Clausen 16a39b7a9c staging:iio: Update iio_event_interface documentation
The documentation for the iio_event_interface does not match the actual struct
anymore. This patch removes the documentation for non-existing fields and adds
documentation for missing fields.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 10:05:05 -08:00
Lars-Peter Clausen 7e632344ad staging:iio: Setup buffer access functions when allocating the buffer
Setup the buffer access functions in the buffer allocate function. There is no
need to let each driver handle this on its own.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 10:03:51 -08:00
Olof Johansson 54461c3067 staging:iio: ak8975: add of_match table for device-tree probing
Just like isl29018; trivial addition. Using both asahi-kasei,ak8975 and
the non-prefixed version (I couldn't figure out if Asahi Kasei had a
stock symbol to use, I only found numerical indexes for their stock info).

Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 10:03:51 -08:00
Olof Johansson 4ee195241a staging:iio: isl29018: add of_match table for device-tree probing
As simple as can be right now; just one ID and no custom properties to parse.

Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 10:03:51 -08:00
Dan Carpenter cba2c99363 Staging: comedi: logical || vs bitwise |
These are bitfields and the intend was to OR them together.  A logical
OR here is simply 1.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 10:02:22 -08:00
Ian Abbott 22494ed9b8 staging: comedi: ni_pcidio: Support trailing edge external trigger
This patch is ported over by me (Ian Abbott) from the out-of-tree Comedi
git repository at "git://comedi.org/git/comedi/comedi.git".

The original patch is by Nicholas Nell.

The patch adds support for trailing (falling) edge external triggers for
scans in asynchronous command support in the ni_pcidio driver.  This is
supported at least on the PCI-DIO_32HS and PCI-6533 boards; not sure
about the other boards.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Nicholas Nell <nicholas.nell@colorado.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 10:02:21 -08:00
Ian Abbott 02f69d6768 staging: comedi: ni_pcidio: Add comedi_poll support
This patch is ported over by me (Ian Abbott) from the out-of-tree Comedi
git repository at "git://comedi.org/git/comedi/comedi.git".

The original patch is by Nicholas Nell.

The patch adds support for the COMEDI_POLL ioctl to the ni_pcidio
driver.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Nicholas Nell <nicholas.nell@colorado.edu>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 10:01:11 -08:00
Ian Abbott e3794b52f5 staging: comedi: ni_pcidio: Grab MITE spinlock while preparing DMA.
When setting up the DMA for 'read' streaming acquisition command, grab
the MITE channel spinlock before preparing and arming the DMA.

Change inspired by ni_ai_setup_MITE_dma() in ni_mio_common.c.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 10:00:37 -08:00
Ian Abbott 41add2e84b staging: comedi: ni_pcidio: Mark buffer for writing when setting up DMA.
When setting up the DMA for 'read' streaming acquisition on the DIO
subdevice, mark the whole buffer as writable before starting the DMA.
This prevents a spurious detection of a DMA overwrite of good data
during the first interrupt.

Problem reported by Nicholas Nell.  Fix suggested by Frank Mori Hess.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 10:00:36 -08:00
Ian Abbott 9e77e6b62e staging: comedi: adv_pci_dio: Advantech PCI-1739U support
This patch is ported over by me (Ian Abbott) from the out-of-tree Comedi
git repository at "git://comedi.org/git/comedi/comedi.git".

The original patch is by Nicholas Nell.

-----
Advantech PCI-1739U support

Hello,

I've added a bit of simple configuration to adv_pci_dio.c in order to
make the PCI-1739U work with the adv_pci_dio driver. I have tested
inputs only so far but they seem to work. A git style patch is
attached.

Thanks,

--
Nicholas Nell
Professional Research Assistant
University of Colorado
-----

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Nico Nell <nicholas.nell@colorado.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:59:40 -08:00
Ian Abbott f3445c1e59 staging: comedi: me4000: Check for unsupported INSN_CONFIG.
The INSN_CONFIG handler for the DIO subdevice should error out for
unsupported configuration instruction codes.

Also fix incorrect use of constant COMEDI_OUTPUT where
INSN_CONFIG_DIO_OUTPUT was meant.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:55:54 -08:00
Ian Abbott 8383def69b staging: comedi: dt2801: do INSN_CONFIG properly for DIO subdevice.
Handle INSN_CONFIG_DIO_INPUT, INSN_CONFIG_DIO_OUTPUT and
INSN_CONFIG_DIO_QUERY in data[0].

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:55:53 -08:00
Ian Abbott 586b983927 staging: comedi: ni_pcimio: Add support for NI PXIe-6251
Paul Fulmek reports that PXIe-6251 works the same as the existing
PCIe-6251 and just needs the new PCI device ID adding to ni_pci_table[]
and a new entry adding to ni_boards[] based on the existing entry for
PCIe-6251.

The new entry has PCI device ID 0x72e8 and board name "pxie-6251".

Thanks Paul!

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:55:53 -08:00
Dan Carpenter 2e25421294 Staging: wlan-ng: cap the ssid length
We're getting the ssid length from the scan here.  Let's cap it before
doing the memcpy().

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:51:47 -08:00
Jesper Juhl 881763361e staging, media, easycap: Fix mem leak in easycap_usb_probe()
If allocating 'pdata_urb' fails, the function will return -ENOMEM
without freeing the memory allocated, just a few lines above, for
'purb' and will leak that memory when 'purb' goes out of scope.

This patch resolves the leak by freeing the allocated storage with
usb_free_urb() before the return.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:51:47 -08:00
Masanari Iida d0bc218b0a staging: Fix typo in ieee80211_rx.c
Correct spelling "suppported" to "supported" in
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c

Signed-off-by: Masanari iida<standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:51:17 -08:00
Dan Carpenter 3e150cf51d Staging: sbe-2t3e3: logical || vs bitwise |
Bitwise OR was clearly intended here.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:51:17 -08:00
Tomas Winkler 190f998b79 staging/mei: TODO : how to handle example code after unstaging
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:44:58 -08:00
Tomas Winkler c52827cc4d staging/mei: add mei user space example
this example tries to connect to amt host interface client and retrieve
versions of its sub components

When AMT is enabled an output might look like that:
Intel AMT: ENABLED
Flash:	6.1.0
Netstack:	6.1.0
AMTApps:	6.1.0
AMT:	6.1.0
Sku:	258
VendorID:	8086
Build Number:	1042
Recovery Version:	6.1.0
Recovery Build Num:	1042
Legacy Mode:	False

otherwise:
Intel AMT: DISABLED

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:44:58 -08:00
Tomas Winkler edf1eed466 staging/mei: normalize prototypes of all read buffers
1. convert all read buffers to unsigned char and drop useless castings
2. simplify mei_read_slots implementation

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:44:57 -08:00
Tomas Winkler 733ba91cc0 staging/mei: update copyright year to 2012
1. Update Copyright to 2012
2. Also fix mei.h copyright format
   checkpaatch complained:
   WARNING: please, no spaces at the start of a line

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:44:56 -08:00
Kashyap Gada 8ebc0b65d7 Staging: ft1000: ft1000-pcmia: fix space required after that ', ' in ft1000_proc.c
This is a patch to the ft1000_proc.c that fixes up space required after
',' errors found by the checkpatch.pl tool

Signed-off-by: Kashyap Gada <gada.kashyap@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:44:35 -08:00
Bart Westgeest 34c0957817 staging: usbip: removed #if 0'd out code
Signed-off-by: Bart Westgeest <bart@elbrys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:42:23 -08:00
Bart Westgeest ac2b41acfa staging: usbip: changed function return type to void
The function usbip_pad_iso never returns anything but 0 (success).

Signed-off-by: Bart Westgeest <bart@elbrys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:42:23 -08:00
Bart Westgeest 98b9de2189 staging: usbip: removed unused structure field
Signed-off-by: Bart Westgeest <bart@elbrys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:42:22 -08:00
Thomas Meyer 37fe58ba68 staging: drm/omap: Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(..
The semantic patch that makes this change is available
in scripts/coccinelle/api/err_cast.cocci.

More information about semantic patching is available at
http://coccinelle.lip6.fr/

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:41:34 -08:00
Márton Németh aa2f92ae6b staging: rts5139: fix pointer coding style
This will remove the following checkpatch.pl error:
ERROR: "foo * bar" should be "foo *bar"

Signed-off-by: Márton Németh <nm127@freemail.hu>
Acked-by: edwin_rong <edwin_rong@realsil.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:41:34 -08:00
Szymon Janc 74eabe4ca2 Staging: quickstart: Use pr_err and pr_info for logs
Signed-off-by: Szymon Janc <szymon@janc.net.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:41:33 -08:00
Víctor Manuel Jáquez Leal 451196a338 staging: tidspbridge: remove CONFIG_TIDSPBRIDGE_DEBUG
Since all the asserts and DBC macros are gone, the kconfig macro
CONFIG_TIDSPBRIDGE_DEBUG is not almost used, but for printing trace messages.

Since it is almost not used, I don't see any case for keep it churning the
configuration menu.

This patch removes completely the kconfig macro CONFIG_TIDSPBRIDGE_DEBUG,
using only TIDSPBRIDGE_BACKTRACE for enabling the debug trace messages.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:38:19 -08:00
Víctor Manuel Jáquez Leal f7c908ef87 staging: tidspbridge: remove dbc.h
All the macros in dbc.h are removed now so this patch removes it completely.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:38:19 -08:00
Víctor Manuel Jáquez Leal 40e6336d1b staging: tidspbridge: remove DBC_ASSERT macro
This macro is only valid when CONFIG_TIDSPBRDIGE_DEBUG is enabled and it only
prints a log message, it is not a real assertion mechanism like BUG_ON() or
WARN_ON().

It is better to remove them: less code to maintain.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:38:19 -08:00
Víctor Manuel Jáquez Leal 276cc746d5 staging: tidspbridge: remove DBC_ENSURE and DBC_REQUIRED
The kernel does not use a "Design by Contract" approach, and it is only
activated in the module if CONFIG_TIDSPBRDIGE_DEBUG is enabled, so they are
executed rarely. It is better to remove them: less code to maintain.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:38:18 -08:00
Joe Perches 8900f00b15 staging: tidspbridge: Rename module from bridgedriver to tidspbridge
tidspbridge when built as a module is named bridgedriver.

bridgedriver is not a particularly good module name.

tidspbridge is what the source is named.  That seems
a more appropriate module name too as it describes
the hardware function better.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Acked-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:37:11 -08:00
Víctor Manuel Jáquez Leal 3bdb54fc54 staging: tidspbridge: use the driver name string
Instead of assign it to a global variable which is not used anymore.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:32:10 -08:00
Víctor Manuel Jáquez Leal 4f8aae5375 staging: tidspbridge: clean up bridge_mmap()
The variable offset is not used but in the debug log, so I don't see reason to
calculate it here.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:32:09 -08:00
Víctor Manuel Jáquez Leal b8bfa4c57c staging: tidspbridge: remove trivial assert
The function dsp_deinit() always return true, so assert its output is
pointless. As consequence the variable were the returned value is stored, is
no longer needed.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:32:09 -08:00
Víctor Manuel Jáquez Leal 0b86809a90 staging: tidspbridge: remove header inclusions
drv_interface.c include several header files that are not really used.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:32:09 -08:00
Víctor Manuel Jáquez Leal 9fdf655061 staging: tidspbridge: silence the compiler
When compiling this report is raised by the compiler:

  CC [M]  drivers/staging/tidspbridge/rmgr/drv_interface.o
drivers/staging/tidspbridge/rmgr/drv_interface.c: In function 'bridge_mmap':
drivers/staging/tidspbridge/rmgr/drv_interface.c:275:2: warning: format '%lx' expects type 'long unsigned int', but argument 9 has type 'pgprot_t'

This patch fixes that warning message.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:32:08 -08:00
Víctor Manuel Jáquez Leal 7724e8bfda staging: tidspbridge: Lindent to drv_interface.c
No functional changes.

According to Lindent, the file drv_internface.c had some lines with bad
indentation.

This commit is the output of Lindent.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:32:08 -08:00
Víctor Manuel Jáquez Leal 518761dba1 staging: tidspbridge: remove unused header
No functional changes.

The header file drv_interface.h was only used locally, hence there's no need
to have it.

Also the only prototyped functions were the file_operations callbacks, then
this commit moves them up to avoid prototyping too.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:32:07 -08:00
Víctor Manuel Jáquez Leal 4f1ef76165 staging: tidspbridge: more readable code
Uppercase function names are not pretty. Also the code flow readability is
enhanced.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:32:07 -08:00
Sam Hansen 4a6b1518d7 staging: xgifb: checkpatch cleanup printk() -> pr_lvl()
Rewrote code to use pr_lvl() instead of printk().  There are still a few
instances of printk(), mainly in the debug code which looks like it's going to
be dropped/rewrote (most of it is blocked out).

Signed-off-by: Sam Hansen <solid.se7en@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:25:45 -08:00
Sam Hansen b4fdf7be0a staging: xgifb: checkpatch cleanup __func__
Replaced an instance of __FUNCTION__ with __func__ in XGI_main_26.c.

Signed-off-by: Sam Hansen <solid.se7en@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:24:38 -08:00
Sam Hansen cae9a7bef2 staging: xgifb: checkpatch cleanup braces
Cleaned up XGI_main_26.c and removed some unneeded braces to keep with code
conventions.

Signed-off-by: Sam Hansen <solid.se7en@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:24:10 -08:00
Sam Hansen 96c66042be staging: xgifb: pr_fmt kbuild macro
Added the kbuild macro pr_fmt() to XGI_main_26.c

Signed-off-by: Sam Hansen <solid.se7en@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:23:09 -08:00
Peter Huewe 7ad6651d78 staging/xgifb: Remove remaining duplicate structs and defines
This patch removes the now unused structs and defines which were mere
duplicates of the ones in the sgi headers

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:21:57 -08:00
Peter Huewe fc39dcb7fa staging/xgifb: Use structs and defines from the sis headers
This patch removes the usage of some xgi structs and defines and
replaces them with the _identical_ structs from the sis headers.
Thus the old structs and defines can be removed.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:21:56 -08:00
Peter Huewe b33704dffa staging/xgifb: Include sis headers
This patch includes the headers of the sis driver and reorders some
includes.

Since the xgi driver used to redefine a lot of stuff from the sis
driver, we can simply include the headers of the sis driver itself, so
we can remove duplicated stuff later on.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:21:56 -08:00
Peter Huewe e24b0a3f0c staging/xgifb: Remove unsupported mode LCD_320x480
This patch removes the probed mode LCD_320x480 which isn't supported
anyway since this mode falls through to the default (=invalid) mode in
the
XGIfb_validate_mode function (see line 529 ff. for details. the
commented out code for this mode is also removed).

By removing this assignment, we can use the LCD_TYPEs from the sis
driver without modifications.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:21:55 -08:00
Jesper Juhl e3b09e4bf6 staging, vt6656/wpactl.c: Fix mem leak in wpa_ioctl()
If we hit the default case in the switch statement in wpa_ioctl()
we'll leak the memory allocated to 'param' when the variable goes out
of scope without having been assigned to anything.

This patch fixes the leak by kfree()'ing the memory before we return
from the function.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:20:06 -08:00
Jesper Juhl 4e1efd6e85 staging, vt6656/wpactl.c: A basic style cleanup
This patch cleans up the coding style in
drivers/staging/vt6656/wpactl.c to closer match the generally accepted
kernel CodingStyle. It is by no means a "make it perfect" patch, but
it does get the file a fair bit closer to matching the accepted style
(whomever was involved in the evolution of this file seriously need to
configure their editors to maintain a consistent style - it was a
mess).

Besides pure style cleanups I also took the liberty of removing some
pointless parens, some unneeded casts and removing some commented out code
(it was obviously not used and git has it if it's ever needed in the
future).

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:20:06 -08:00
mahendra singh meena 08afcf9c9f Staging: vt6655: Fix brace coding style issues in ioctl.c
This patch fixes up unnecessary brace warnings found in ioctl.c
by checkpatch.pl .

Signed-off-by: Mahendra Singh Meena <mahendra.devel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:19:21 -08:00
Marcos Paulo de Souza 2fdde902ca staging: vt6656: iwctl.c: Rewrite siwrts funciton
This function has the following issues:
	Parameter info and extra are not used
	Wrong error handling(the function not return -EINVAL when it
happens)

This patch simplifies this funtion, remove the not used parameters and
fix the error handilng.

Signed-off-by: Marcos Paulo de Souza <marcos.mage@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:18:27 -08:00
Marcos Paulo de Souza 739ea07640 staging: vt6656: iwctl.c: Remove return statement of iwctl_giwrate
This function will always return 0, and this data is not used by who
calls this function.

Signed-off-by: Marcos Paulo de Souza <marcos.mage@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:18:26 -08:00
Marcos Paulo de Souza caa20de816 staging: vt6656: iwctl.c: Remove return statement of iwctl_giwessid
This function will always return 0, and this data is not used by who
calls this function.

Signed-off-by: Marcos Paulo de Souza <marcos.mage@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:18:26 -08:00
Marcos Paulo de Souza f9b9f93426 staging: vt6656: Remove return statement of iwctl_giwrange
The function iwctl_giwrange will always return 0, and this data is not
used by who calls this function.

Signed-off-by: Marcos Paulo de Souza <marcos.mage@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:18:26 -08:00
Marcos Paulo de Souza 5d11b1737d staging: vt6656: Remove return statement of iwctl_giwmode
This function will always return 0, and this data is not used by who
calls this function.

Signed-off-by: Marcos Paulo de Souza <marcos.mage@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:18:25 -08:00
Marcos Paulo de Souza 506215ba22 staging: vt6656: iwctl.c: Remove useless function
The funciton iwctl_commit does nothing, and can be removed.

Signed-off-by: Marcos Paulo de Souza <marcos.mage@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:18:25 -08:00
Marcos Paulo de Souza 1a2463f6e2 staging: vt6656: iwctl.c: Remove commented code
Signed-off-by: Marcos Paulo de Souza <marcos.mage@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:18:24 -08:00