s626_attach is referencing s626_pci_table which is annotated
__devinitconst. Put pci vendor/device ids in the s626_board struct and
use s626_boards instead similar to what is done in gsc_hpdi.
v2: I had moved the PCI id defines to s626.h earlier, but later
decided to leave them in s626.c and forgot to move them up above where
they are being used in s626_boards.
staging: comedi: refactor 8255 driver to remove forward declarations
Move the module_init/module_exit routines and the associated
struct comedi_driver variable to the end of the source. This is
more typical of how other drivers are written and removes the
need for the forward declarations.
Also, move the do_config function to remove needing to have
a forward declaration for that routine.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: refactor the acl7225b driver to remove the forward declarations
Move the module_init/module_exit routines and the associated
struct comedi_driver and struct boardtype variables to the end
of the source. This is more typical of how other drivers are
written and removes the need to the forward declarations.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: refactor the adl_pci6208 driver to remove the forward declarations
Move the module_init/module_exit routines and variables to the
end of the source as is more typically done with other drivers.
Then rearrange the attach/detach and probe/remove functions,
this removes the need for all the forward declarations.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: refactor adl_pci9111 driver to remove forward declarations
Move the module_init/module_exit routines and variables to the
end of the source as is more typically done with other drivers.
Then rearrange the attach/detach and probe/remove functions,
this removes the need for all the forward declarations.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: refactor adq12b driver to remove forward declarations
Move the module_init/module_exit routines and the associated
struct comedi_driver and struct boardtype variables to the end
of the source as is more typically done with other drivers. Then
rearrange the attach/detach functions, this removes the need
for all the forward declarations.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: vt6656: trivial whitespace cleanups to ioctl.c
This removes a space between a cast and the variable and makes the
case statements in the switch stylewise consistent as to whether
there's a blank line before each 'case' or not.
staging: wlan-ng: Release struct returned by cfg80211_inform_bss to avoid potential memory leak.
Function cfg80211_inform_bss returns a pointer to a referenced struct cfg80211_bss
but no information is needed from this struct in function prism2_scan and therefore
we release it by calling cfg80211_put_bss.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jonathan Cameron [Sat, 21 Apr 2012 09:09:34 +0000 (10:09 +0100)]
staging:iio: scan_index_timestamp move to iio_dev from buffer
This is just a locally cached value that is device specific (rather
than buffer specific.) Hence it wants to come out of the buffer before
we add multiple buffer support.
Jonathan Cameron [Sat, 21 Apr 2012 09:09:33 +0000 (10:09 +0100)]
staging:iio:buffer: pull computation of scan length into a utility function.
Principal reason is to make later patches more coherent and easier to review
but this set in itself separates a logical entity out nicely wihin the code.
staging: iio: light: isl29018: use regmap for register access
Using regmap for accessing register through i2c bus. This will
remove the code for caching registers, read-modify-write logics.
Also it will provide the debugfs feature to dump register
through regmap debugfs.
John Stultz [Tue, 24 Apr 2012 17:57:16 +0000 (10:57 -0700)]
staging: android-alarm: Switch from wakelocks to wakeup sources
In their current AOSP tree, the Android in-kernel wakelock
infrastructure has been reimplemented in terms of wakeup
sources:
http://git.linaro.org/gitweb?p=people/jstultz/android.git;a=commitdiff;h=e9911f4efdc55af703b8b3bb8c839e6f5dd173bb
The Android alarm driver currently has stubbed out calls
to wakelock functionality. So this patch simply converts
the stubbed out wakelock calls to wakeup source calls, and
removes the empty wakelock macros
Greg, would you mind queuing this in staging-next?
CC: Colin Cross <ccross@android.com> CC: Arve Hjønnevåg <arve@android.com> CC: Greg KH <gregkh@linuxfoundation.org> 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>
Now that our module_init/exit path is just registering and unregistering
the usb driver, we can use module_usb_driver() instead. This also has
the nice side affect of removing the unneeded printk for the module
version number.
CC: Markus Grabner <grabner@icg.tugraz.at> CC: Stefan Hajnoczi <stefanha@gmail.com> CC: Julia Lawall <julia@diku.dk> CC: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Staging: line6: remove teardown code from module_exit path
These pcm values should all be stopped properly when the device is
removed from the system (i.e. when disconnect is called), so there's no
need to duplicate this when the module is unloaded as well.
CC: Markus Grabner <grabner@icg.tugraz.at> CC: Stefan Hajnoczi <stefanha@gmail.com> CC: Julia Lawall <julia@diku.dk> CC: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Staging: line6: only allocate a buffer if it is needed
Only allocate the version request buffer if it is needed, not when the
module starts up. This will let us make the module_init path much
smaller.
CC: Markus Grabner <grabner@icg.tugraz.at> CC: Stefan Hajnoczi <stefanha@gmail.com> CC: Julia Lawall <julia@diku.dk> CC: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Static variables are initialized to NULL, no need to do it again in the
module_init function.
CC: Markus Grabner <grabner@icg.tugraz.at> CC: Stefan Hajnoczi <stefanha@gmail.com> CC: Julia Lawall <julia@diku.dk> CC: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Larry Finger [Fri, 20 Apr 2012 19:45:37 +0000 (14:45 -0500)]
staging: r8192e_pci: Change memcpy to memcmp
Routine rtllib_MlmeDisassociateRequest() has a comparison of memcpy()
with NULL, which makes no sense. Analysis of the code suggests that
memcmp() was intended.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John Stultz [Fri, 20 Apr 2012 19:31:44 +0000 (12:31 -0700)]
staging: android-alarm: Convert ALARM_ELAPSED_REALTIME to use CLOCK_BOOTTIME
The ALARM_ELAPSED_REALTIME clock domain in Android pointed
to the need for something similar in linux system-wide
(instead of limited to just the alarm interface).
Thus CLOCK_BOOTTIME was introduced into the upstream kernel
in 2.6.39.
This patch attempts to convert the android alarm timer to utilize
the kernel's CLOCK_BOOTTIME clockid for ALARM_ELAPSED_REALTIME,
instead of managing it itself.
CC: Colin Cross <ccross@android.com> CC: Thomas Gleixner <tglx@linutronix.de> 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>
Dan Carpenter [Fri, 20 Apr 2012 11:46:27 +0000 (14:46 +0300)]
staging: comedi vmk80xx: lock held on error path
If the user passes an invalid command, then we don't drop the lock
before returning. The check for invalid commands doesn't need to be
done under lock so I moved it forward a couple lines.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Julia Lawall [Thu, 19 Apr 2012 11:03:58 +0000 (13:03 +0200)]
drivers/staging/wlags49_h2/wl_pci.c: add missing wl_device_dealloc and wl_remove
The need for wl_device_dealloc is motivated by the error-handling code for
the failure of wl_adapter_insert. The need for wl_remove in the third case
is motivated by the code in the definition of wl_pci_remove.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Wed, 18 Apr 2012 06:48:59 +0000 (09:48 +0300)]
Staging: wlan-ng: off by one in prism2mgmt_scan_results()
Count is used to cap "req->bssindex.data" which is used as an offset
into the hw->scanresults->info.hscanresult.result[] array. The array
has only HFA384x_SCANRESULT_MAX (31) elements so the 32 is off by one.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers: staging: vme: devices: Remove unneeded include version.h
The output of "make versioncheck" told us that:
drivers/staging/vme/devices/vme_pio2_core.c: 13 linux/version.h not needed.
drivers/staging/vme/devices/vme_pio2_gpio.c: 13 linux/version.h not needed.
If we take a look at these files, we will agree to remove it.
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: <devel@driverdev.osuosl.org> Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Tue, 17 Apr 2012 06:47:25 +0000 (09:47 +0300)]
Staging: wlags49_h2: reading past the end of array
The original code had some confusion about the dimensions of the array.
It should have been an array of 2 element arrays but it was declared as
an array of 50 element arrays.
The limitter on the outside array should have been
ARRAY_SIZE(chan_freq_list) or 26 but instead 50 was used. It meant that
we read past the end. It's probably harmless but it's obviously worth
fixing.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Tue, 17 Apr 2012 20:37:31 +0000 (23:37 +0300)]
Staging: rtl8192u: fix some memory corruption
When we received a command we incremented a stat counter depending on
the type of message. The problem is there were 8 types of commands but
there were only 4 counters allocated so it corrupted memory past the
end of the rxcmdpkt[] array.
The fix is just to remove the counters because they aren't used.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> ACKed-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Randy Dunlap [Tue, 17 Apr 2012 01:01:24 +0000 (18:01 -0700)]
staging: fix android alarm.c printk format warnings
Fix printk format warnings by using 't' modifier for ptrdiff_t.
drivers/staging/android/alarm.c:344:2: warning: format '%ld' expects type 'long int', but argument 2 has type 'int'
drivers/staging/android/alarm.c:367:3: warning: format '%ld' expects type 'long int', but argument 2 has type 'int'
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Cc: Brian Swetland <swetland@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jonathan Cameron [Sun, 15 Apr 2012 16:41:30 +0000 (17:41 +0100)]
staging:iio: Make read / write attributes for channel values optional.
Until now all channels have had read/write attributes. This patch
allows for channels where we can't actually read the value (or for
output devices, write it!)
v2 introduces separate elements for processed and raw thus removing
some special case code from the core. Thanks to Lars-Peter for an
excellent suggestion!
Jonathan Cameron [Sun, 15 Apr 2012 16:41:22 +0000 (17:41 +0100)]
staging:iio:light Add IIO_CHAN_INFO_RAW/PROCESSED entries to all drivers.
Precursor to making value read / write attribute optional.
Note that minimal change route taken here. The read_raw callbacks
in both drivers could do fewer checks to identify the channel than
they now do.
Jonathan Cameron [Sun, 15 Apr 2012 16:41:16 +0000 (17:41 +0100)]
staging:iio: add a raw and processed elements to info_mask
This will allow us to have drivers where the channel value
may not be read or written but other information is available.
Also adds the ability to have both processed and raw access
to a given channel, though in most cases this doesn't make
sense.
Ultimately will lead to simpler code by allowing us to drop
the special case handling for the value reading cases.