Commit graph

310674 commits

Author SHA1 Message Date
Michael Hennerich 011c10c351 iio: ad9523: Fix argument type mismatch
drivers/iio/frequency/ad9523.c:378 ad9523_vco_out_map()
	 warn: value 2 can't fit into 1 'out'

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 14:50:51 -07:00
Peter Meerwald cf35ad61ac iio: add mcp4725 I2C DAC driver
v5:
* fix warnings (Jonathan Cameron)

v4:
* remove unused indio_dev pointer in mcp4725_data (Jonathan Cameron)
* use u16 instead of unsigned short in mcp4725_data (Jonathan Cameron)
* #include mcp4725.h from linux/iio/dac/

v3:
* move from staging to drivers/iio
* switch to chan_spec
* dev_get_drvdata() -> dev_to_iio_dev()
* annotate probe() and remove() with __devinit and __devexit

v2 (based on comments from Jonathan Cameron and Lars-Peter Clausen):
* did NOT switch to chan_spec yet
* rebase to staging-next tree, update iio header locations
* dropped dac.h #include, not needed
* strict_strtol() -> kstrtol()
* call iio_device_unregister() in remove()
* everything in one patch

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 14:50:51 -07:00
Dan Carpenter 1a135d1ab5 iio: frequency: adf4350: using an uninitialized variable
GCC complains that we use an uninitialized variable if the user passes
an invalid parameter to adf4350_read().  I decided that we should return
-EINVAL instead in that case.

However, when I looked up at adf4350_write() it returned -ENODEV for
that condition.  In the end, I decided the -EINVAL was the right thing
and I change adf4350_write() to match.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 14:48:39 -07:00
Dan Carpenter e86ee142a2 iio: frequency: adf4350: fix an initialization
Sparse complains about this:
drivers/iio/frequency/adf4350.c:58:29: warning: Initializer entry defined twice
drivers/iio/frequency/adf4350.c:59:10:   also defined here

It looks like '|' was intended here instead of ','.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 14:47:03 -07:00
Peter Meerwald f9eb89e97d iio: max517: mark probe() and remove() with __devinit and __devexit
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Roland Stigge <stigge@antcom.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 14:45:16 -07:00
Peter Meerwald 227d5e0040 iio: remove indio_dev pointer from max517_data
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Roland Stigge <stigge@antcom.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 14:45:16 -07:00
Dan Carpenter 17c88eb6a0 iio: frequency: ad9523: unlock on error in ad9523_reg_access()
There was a return path which got missed accidentally.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 14:45:16 -07:00
H Hartley Sweeten 03afcf4727 staging: comedi: cleanup comedi_alloc_subdevices
Access the individual comedi_subdevices using a pointer instead
of directly accessing as an array. This is how the rest of the
comedi core accesses them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbott@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 14:44:04 -07:00
H Hartley Sweeten 8b6c56949f staging: comedi: propogate error code from comedi_alloc_subdevices
comedi_alloc_subdevices can fail with -EINVAL or -ENOMEM. When it
does fail make sure to pass the proper error code back.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbott@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 14:44:04 -07:00
H Hartley Sweeten eea6838b12 staging: comedi: remove the "Allocate the subdevice..." comments
These comments are redundant. The function name 'comedi_alloc_subdevices'
provides this information.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <ian@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 14:44:03 -07:00
H Hartley Sweeten 0e4039f311 staging: comedi: remove the comed_alloc_subdevices "allocation failed" messages
Remove all the "allocation failed" debug messages that are displayed
when the comedi_alloc_subdevices call fails.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbot <abbott@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 14:44:03 -07:00
H Hartley Sweeten fba1d0faf7 staging: comedi: only set dev->n_subdevices when kcalloc succeedes
It's possible for the kcalloc in comedi_alloc_subdevices to fail.
Only set the dev->n_subdevices variable if the allocation is
successful.

Since the core sets dev->n_subdevices, remove all the places in the
drivers where this variable was getting set.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbott@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 14:44:03 -07:00
H Hartley Sweeten 7f801c4171 staging: comedi: sanity check num_subdevices parameter in comedi_alloc_subdevices
It's possible for a couple of the comedi drivers to incorrectly call
comedi_alloc_subdevices with num_subdevices = 0. Add a sanity check
before doing the kcalloc.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbot@mev.co.uk>
Cc: Frank Mori Hess <kmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 14:44:03 -07:00
H Hartley Sweeten 8b9ba6e5ef staging: comedi: change type of num_subdevices parameter to comedi_alloc_subdevices
The n_subdevices variable of struct comedi_device is an int type.
Change the type of the comedi_alloc_subdevices 'num_subdevices' from
an unsigned int to an int to match it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbott@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 14:40:51 -07:00
Ben Chan 0c16ae7629 staging: gdm72xx: Simplify spinlock fix for gdm_usb_send_complete
This patch simplifies the previous patch (commit
dd13c86b0d) for fixing the spinlock
recursion issue on several call sites of gdm_usb_send_complete.

Signed-off-by: Ben Chan <benchan@chromium.org>
Cc: Sage Ahn <syahn@gctsemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 14:37:28 -07:00
Sachin Kamat 592314e9e1 staging: Android: Fix NULL pointer related warning in alarm-dev.c file
Fixes the following sparse warning:
drivers/staging/android/alarm-dev.c:259:35: warning: Using plain integer as NULL pointer

Cc: Brian Swetland <swetland@google.com>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 11:20:17 -07:00
Sachin Kamat c810a39979 staging: Android: Fix some checkpatch warnings
Warnings reported by checkpatch.pl have been fixed.

Cc: Brian Swetland <swetland@google.com>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 11:20:17 -07:00
H Hartley Sweeten 2f0b9d082e staging: comedi: export alloc_subdevices as comedi_alloc_subdevices
Move the inline alloc_subdevices() function from comedidev.h
to drivers.c and rename it to comedi_alloc_subdevices(). The
function is large enough to warrant being an exported symbol
rather than being an inline in every driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 11:14:33 -07:00
Justin P. Mattock e34995148a staging "sep" Fix typos found while reading.
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 11:14:33 -07:00
Samuel Iglesias Gonsalvez 7a2ea600fc Staging: ipack: delete sysfs from to-do list.
As we have already got rid of sysfs files in the tpci200 driver, it is needed
to delete that mention in the TODO file.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 10:59:27 -07:00
William Blair 383b7fc2dc Staging: keucr: init: fixed a brace coding style issue
Fixed a coding style issue.

Signed-off-by: William Blair <wdblair@bu.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 10:59:27 -07:00
Andrzej Pietrasiewicz 4bce6b897e staging: usb: gadget: Configurable Composite Gadget depends on BLOCK
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 10:59:26 -07:00
Samuel Iglesias Gonsalvez 14e70bfdc6 Staging: ipack: remove pr_fmt definition.
As there is no pr_* function used here, pr_fmt is not needed.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 10:59:26 -07:00
Javier M. Mellid 925aa6600c staging: sm7xxfb: sm7xx becomes sm7xxfb
Rename sm7xx driver to sm7xxfb. Fix Kconfig and Makefile to fit the new
change.

Changes are coherent with the rest of stable framebuffer drivers. TODO
updated.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 10:55:54 -07:00
Javier M. Mellid 0beb30d365 staging: sm7xx: update comments and clarify supported chips
This patch updates/adds comments in order to clarify devices and Lynx
families supported for this driver.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 10:55:54 -07:00
Javier M. Mellid 67c4e9f46b staging: sm7xx: code improvement
This patch simplifies code. It erases redundant code under little endian
compilations.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 10:55:54 -07:00
Dan Carpenter 6fe864409b Staging: rtl8187se, rtl8192e: fix '&' vs '|' bugs
The original code is equivalent to:

	wrqu->retry.flags = 0x1000 & 0x0002;

so it just sets .flags to zero.  We should be ORing the values together
like r8192_wx_get_retry() does in drivers/staging/rtl8192u/r8192U_wx.c.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 10:52:32 -07:00
Masanari Iida 0cf5755f00 staging: rts5139: Fix typo in rts5139
Correct spelling typo in rts5139/rts51x_chip.h, rts51x_scsi.h

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 10:52:32 -07:00
Masanari Iida 60ebf60b61 staging: Fix typo in winbond
Correct spelling typo in winbond/mto.c and mds_s.h

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 10:52:32 -07:00
Ben Chan dd13c86b0d staging: gdm72xx: Fix spinlock recursion on gdm_usb_send_complete
This patch fixes a spinlock recursion bug on several call sites of
gdm_usb_send_complete by not calling spin_lock_irqsave on
urb->context->tx_cxt->lock when the lock has already been acquired.

Signed-off-by: Ben Chan <benchan@chromium.org>
Cc: Sage Ahn <syahn@gctsemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 10:52:32 -07:00
Kevin McKinney 7dd80eb925 Staging: bcm: Return -ENOMEM instead of -1 when memory not acquired in nmv.c
This patch changes the return statement on two
conditions where memory could not be acquired.
It returns -ENOMEM instead of -1.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 10:50:52 -07:00
Kevin McKinney 6788d7dab6 Staging: bcm: Use udelay instead of msleep for delays in nvm.c
This patch uses udelay instead of msleep for delays
because msleep can sleep up to 20ms for any value
less than 20.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 10:49:53 -07:00
Kevin McKinney 7dcc1327d0 Staging: bcm: Fix ERROR: return is not a function, parentheses are not required.
This patch fixes the following error reported
by checkpatch.pl in nvm.c: "ERROR: return is
not a function, parentheses are not required".

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 10:49:53 -07:00
Kevin McKinney de443c96e5 Staging: bcm: Correctly format all comments in nvm.c
This patch correctly formats all comments as reported
by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 10:49:52 -07:00
Kevin McKinney a2940b635b Staging: bcm: Properly format braces in nvm.c
This patch cuddles braces as reported
by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 10:49:52 -07:00
Kevin McKinney 093abf11d3 Staging: bcm: Fix all whitespace issues in nvm.c
This patch resolves all whitespace issues as reported
by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 10:49:52 -07:00
Joe Perches 9b754b17f9 staging: wlags49_h2: remove direct declarations of KERN_<LEVEL> prefixes
Use the standard KERN_<LEVEL> #defines instead of "<.>"

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Henk de Groot <pe1dnn@amsat.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 10:45:26 -07:00
Devendra Naga cf66823dd2 staging/wlan-ng: prsim2fw.c coding style cleanup
this patch fixes the coding style problems found by using checkpatch.pl

drivers/staging/wlan-ng/prism2fw.c:175: ERROR: "foo * bar" should be "foo *bar"
drivers/staging/wlan-ng/prism2fw.c:210: WARNING: line over 80 characters
drivers/staging/wlan-ng/prism2fw.c:596: WARNING: line over 80 characters
drivers/staging/wlan-ng/prism2fw.c:658: ERROR: "foo * bar" should be "foo *bar"

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 10:38:16 -07:00
Devendra Naga 8aac4d4439 staging/wlan-ng: cfg80211.c coding style cleanup
there are warnings that are reported by checkpatch.pl
fixed the following problems

drivers/staging/wlan-ng/cfg80211.c:130: WARNING: line over 80 characters
drivers/staging/wlan-ng/cfg80211.c:366: WARNING: line over 80 characters
drivers/staging/wlan-ng/cfg80211.c:543: WARNING: line over 80 characters
drivers/staging/wlan-ng/cfg80211.c:665: WARNING: line over 80 characters
drivers/staging/wlan-ng/cfg80211.c:692: WARNING: line over 80 characters
drivers/staging/wlan-ng/cfg80211.c:735: WARNING: line over 80 characters

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 10:38:16 -07:00
Justin P. Mattock ef73b7a45d staging: "sbe-2t3e3" Fix typos in sbe-2t3e3
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 10:38:16 -07:00
Devendra Naga 02fd3b3670 staging/gdm72xx: Remove version.h includes
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 10:34:47 -07:00
Adnan Ali dee0dc0d06 Staging: rts5139: sd_cprm: fix coding style and deprecation issues
This commit fixes coding style and deprecation issues which
includes long lines, braces with single statments in if condition
and deprecated min() function.

Signed-off-by: Adnan Ali <adnan.ali@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 10:34:47 -07:00
Adnan Ali ff5e4a1d27 Staging: gdm72xx: gdm_usb: fix deprecated function kernel_thread
This commit fixes deprecated function kernel_thread by replacing
it with kthread_run.

Signed-off-by: Adnan Ali <adnan.ali@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 10:34:47 -07:00
Adnan Ali 6ee19aef76 Staging: ramster: r2net: fix coding style issues
This commit fixes coding style issues related to string splite
across multiple lines.

Signed-off-by: Adnan Ali <adnan.ali@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 10:34:47 -07:00
Adnan Ali 2e0bec9139 Staging: sep: fix coding style issues
This commit fixes coding style issues related to string split
across the lines and space before tab at start of line.

Signed-off-by: Adnan Ali <adnan.ali@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 10:34:47 -07:00
Adnan Ali 1caba565e1 Staging: cptm1217: clearpad_tm1217: fix coding style issues
This commit fixes coding style issues including quoted string
across multiple lines.

Signed-off-by: Adnan Ali <adnan.ali@codethink.co.uk>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 10:34:47 -07:00
Bart Westgeest 1132b9aafa staging: usbip: Updated comment describing VHCI_NPORTS
Updated out-of-date comment describing VHCI_NPORT

Signed-off-by: Bart Westgeest <bart@elbrys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-11 17:06:35 -07:00
Miguel Gómez bf55b48371 Staging: xgifb: disable pci device on pci remove function.
Signed-off-by: Miguel Gómez <magomez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-11 17:02:12 -07:00
Miguel Gómez 05e06036dd Staging: xgifb: disable pci device if there's an error after enabling it.
Signed-off-by: Miguel Gómez <magomez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-11 17:02:12 -07:00
Miguel Gómez d049053ef0 Staging: xgifb: reorder the code a bit to be more module friendly
Signed-off-by: Miguel Gómez <magomez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-11 17:02:11 -07:00