Commit graph

197979 commits

Author SHA1 Message Date
Sachin Kamat de36d817b4 iio: adc: mcp3422: Include linux/of.h header
'of_match_ptr' is defined in linux/of.h. Include it explicitly to
avoid build breakage in the future.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-18 20:05:56 +01:00
Rafael J. Wysocki 981984cbd0 Merge branch 'acpi-fixes'
* acpi-fixes:
  ACPI / PM: Drop two functions that are not used any more
  ATA / ACPI: remove power dependent device handling
  ACPI / power: Drop automaitc resume of power resource dependent devices
  ACPI: remove /proc/acpi/event from ACPI_BUTTON help
  ACPI / power: Release resource_lock after acpi_power_get_state() return error
2013-10-18 13:42:10 +02:00
Josh Wu c8b11de040 iio: at91: introduce touch screen support in iio adc driver
AT91 ADC hardware integrate touch screen support. So this patch add touch
screen support for at91 adc iio driver.
To enable touch screen support in adc, you need to add the dt parameters:
  1. which type of touch are used? (4 or 5 wires), sample period time.
  2. correct pressure detect threshold value.

In the meantime, since touch screen will use a interal period trigger of adc,
so it is conflict to other hardware triggers. Driver will disable the hardware
trigger support if touch screen is enabled.

This driver has been tested in AT91SAM9X5-EK and SAMA5D3x-EK.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
CC: devicetree@vger.kernel.org
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17 23:57:10 +01:00
Peter Meerwald 094509b1d1 staging:iio:hmc5843: Trivial cleanup
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17 23:52:51 +01:00
Peter Meerwald 9d5ad0c3e7 staging:iio:hmc5843: Check initialization and chip identifier
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17 23:52:16 +01:00
Peter Meerwald f3f755197b staging:iio:hmc5843: Introduce _set_range_gain()
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17 23:51:48 +01:00
Peter Meerwald ca4c6172cd staging:iio:hmc5843: Rename _set_rate() to _set_samp_freq()
move locking inside _set() function

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17 23:51:27 +01:00
Peter Meerwald 4f1ca4158d staging:iio:hmc5843: Reorganize _set_meas_conf()
move locking inside _set() function

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17 23:51:07 +01:00
Peter Meerwald 62248758a7 staging:iio:hmc5843: Rename _configure() to _set_mode()
and be consistent with other setter functions in that first argument
is hmc5843_data

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17 23:50:41 +01:00
Peter Meerwald 7183de9450 staging:iio:hmc5843: Remove ability to change operating mode
only continuous mode is supported for now; the driver could/should
be switched to single conversion mode

operating mode should be determined by the way IIO accesses the device
and not exposed explicitly

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17 23:50:10 +01:00
Peter Meerwald cb9b9a828f staging:iio:hmc5843: Add trigger handling
v3:
* use __be16 instead of s16
v2 (thanks to Jonathan Cameron):
* drop dynamic buffer allocation, buffer is in hmc5842_data
* grab timestamp near data acquisition
* restrict available scan masks (only read all axis)

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17 23:47:55 +01:00
Peter Meerwald 39c1882882 staging:iio:hmc5843: Always read all channels values otherwise no updates
v2:
* use __be16 instead of s16

Split out data ready/wait for read measurement
fix bug in case reading status register fails

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17 23:46:43 +01:00
Peter Meerwald 9a3b2d5e0c staging:iio:hmc5843: Rename _check_samp_freq to get_samp_freq_index
and drop/inline helper functions _check_int_plus_micros() and
_show_int_plus_micros()

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17 23:45:41 +01:00
Peter Meerwald ae6f54d2b1 staging:iio:hmc5843: Use SCALE instead of magn_range
v3:
* rename _check_scale() to _get_scale_index()
v2:
* use SCALE instead of CALIBSCALE to control the range/gain
  of measurements

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17 23:45:09 +01:00
Beomho Seo e590d45190 iio: cm36651: Add CM36651 proximity/light sensor
This patch adds a new driver for Capella CM36651 proximity and RGB sensor.

Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17 23:40:19 +01:00
Lars-Peter Clausen a47f6e08ed staging:iio:spear_adc: Fix IRQ check
The test in the spear_adc driver which checks whether the IRQ number returned
by platform_get_irq() has multiple problems. It accepts 0 even though this is
an invalid IRQ. It also rejects IRQ numbers that are larger or equal than
NR_IRQS. First of all drivers should never need to reference NR_IRQS and
secondly with CONFIG_SPARSE_IRQ NR_IRQS is not the upper limit, so the check
might reject valid IRQ numbers. This patch modifies the check to only test
against less or equal to 0.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17 23:14:00 +01:00
Lars-Peter Clausen 2918ad14cc staging:iio:lpc32xx_adc: Fix IRQ check
The test in the lpc32xx_adc driver which checks whether the IRQ number returned
by platform_get_irq() has multiple problems. It accepts 0 even though this is an
invalid IRQ. It also rejects IRQ numbers that are larger or equal than NR_IRQS.
First of all drivers should never need to reference NR_IRQS and secondly with
CONFIG_SPARSE_IRQ NR_IRQS is not the upper limit, so the check might reject
valid IRQ numbers. This patch modifies the check to only test against less or
equal to 0.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Roland Stigge <stigge@antcom.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17 23:11:45 +01:00
Nandini Hanumanthagowda 1c3e56f99c staging: vt6656: removed line over 80 chars warning
Removed the checkpatch warning of line over 80 chars
by breaking the long line into sensible chunks of 2 lines
to comply with coding style

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 13:34:23 -07:00
Nandini Hanumanthagowda efbe51829f staging: vt6656: removed C99-style comments
Linux style for comment is C89 style "/* */" and it
doesn't prefer C99-style comment "//...". Hence replaced
C99-style comments used in code by C89 style comment to
comply with linux coding style

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 13:34:23 -07:00
Nandini Hanumanthagowda 5a69f36db3 staging: vt6656: removed unnecessary parentheses in return statement
There was parentheses around return statement's value which
was not required since return statement is not a function.
Hence removed the parentheses to eliminate the checkpatch error
which states:
	ERROR: return is not a function, parentheses are not required

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 13:34:22 -07:00
Nandini Hanumanthagowda fc044ac39c staging: vt6656: removal of braces under if-control statement
Removed braces under if-else control flow statement whenever
there is only one statement under if-else control statement
to comply with linux coding style

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 13:34:22 -07:00
Nandini Hanumanthagowda 1266ed7633 staging: vt6656: indentation and removal of unnecessary spaces
Removed unnecessary white spaces at beginning of line
and added proper indentation to fix checkpatch warnings/errors
to improve the readability of code

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 13:34:16 -07:00
Archana kumari f1f9f35019 staging: vt6655:removed incorrect casting in hostap.c
This patch fixes the following type of sparse warnings:

drivers/staging/vt6655/hostap.c:733:42: warning: cast from restricted gfp_t
drivers/staging/vt6655/hostap.c:733:42: warning: incorrect type in argument 2 (different base types)
drivers/staging/vt6655/hostap.c:733:42:    expected restricted gfp_t [usertype] flags
drivers/staging/vt6655/hostap.c:733:42:    got int [signed] <noident>

Signed-off-by: Archana kumari <archanakumari959@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 13:32:35 -07:00
Linus Torvalds 83f11a9cf2 Driver core fix for 3.12-rc6
Here is one fix for the hotplug memory path that resolves a regression
 when removing memory that showed up in 3.12-rc1.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iEYEABECAAYFAlJgHqMACgkQMUfUDdst+ykplQCgym3aZCnwCAASgrM5g0fyM5LW
 eR4AmQGqYBZBticsmGqLWDyUksrnL/6S
 =zRIr
 -----END PGP SIGNATURE-----

Merge tag 'driver-core-3.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core fix from Greg KH:
 "Here is one fix for the hotplug memory path that resolves a regression
  when removing memory that showed up in 3.12-rc1"

* tag 'driver-core-3.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
  driver core: Release device_hotplug_lock when store_mem_state returns EINVAL
2013-10-17 10:39:01 -07:00
Linus Torvalds 02a3250fd3 USB fixes for 3.12-rc6
Here are some USB fixes and new device ids for 3.12-rc6
 
 The largest change here is a bunch of new device ids for the option USB
 serial driver for new Huawei devices.  Other than that, just some small
 bug fixes for issues that people have reported (run-time and
 build-time), nothing major.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iEYEABECAAYFAlJgHZMACgkQMUfUDdst+yl5xgCePinICkasywmkWO0CgndCelCx
 nyMAoIQ51ot0igMbmXoSAyq5u0EgVHmG
 =/iU9
 -----END PGP SIGNATURE-----

Merge tag 'usb-3.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
 "Here are some USB fixes and new device ids for 3.12-rc6

  The largest change here is a bunch of new device ids for the option
  USB serial driver for new Huawei devices.  Other than that, just some
  small bug fixes for issues that people have reported (run-time and
  build-time), nothing major"

* tag 'usb-3.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  usb: usb_phy_gen: refine conditional declaration of usb_nop_xceiv_register
  usb: misc: usb3503: Fix compile error due to incorrect regmap depedency
  usb/chipidea: fix oops on memory allocation failure
  usb-storage: add quirk for mandatory READ_CAPACITY_16
  usb: serial: option: blacklist Olivetti Olicard200
  USB: quirks: add touchscreen that is dazzeled by remote wakeup
  Revert "usb: musb: gadget: fix otg active status flag"
  USB: quirks.c: add one device that cannot deal with suspension
  USB: serial: option: add support for Inovia SEW858 device
  USB: serial: ti_usb_3410_5052: add Abbott strip port ID to combined table as well.
  USB: support new huawei devices in option.c
  usb: musb: start musb on the udc side, too
  xhci: Fix spurious wakeups after S5 on Haswell
  xhci: fix write to USB3_PSSEN and XUSB2PRM pci config registers
  xhci: quirk for extra long delay for S4
  xhci: Don't enable/disable RWE on bus suspend/resume.
2013-10-17 10:38:18 -07:00
Linus Torvalds 7b4a515509 Serial driver fixes for 3.12-rc6
Here are two serial driver fixes for your tree.  One is a revert of a
 patch that causes a build error, the other is a fix to provide the
 correct brace placement which resolves a bug where the driver was not
 working properly.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iEYEABECAAYFAlJgH5oACgkQMUfUDdst+yn5ywCfU4Xq4jDcUyc3pEoKfX2kkNZk
 7a8An2brQo3h20xHsIv2NprgYqCjfZpx
 =rcEE
 -----END PGP SIGNATURE-----

Merge tag 'tty-3.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull serial driver fixes from Greg KH:
 "Here are two serial driver fixes for your tree.  One is a revert of a
  patch that causes a build error, the other is a fix to provide the
  correct brace placement which resolves a bug where the driver was not
  working properly"

* tag 'tty-3.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  serial: vt8500: add missing braces
  Revert "serial: i.MX: evaluate linux,stdout-path property"
2013-10-17 10:37:42 -07:00
Linus Torvalds 66eb411ea2 Char / misc driver fixes for 3.12-rc6
Here are some small iio and w1 driver fixes for 3.12-rc6.
 
 There is also a hyper-v fix in here, which turned out to be incorrect,
 so it was reverted.  That will probably have to wait unto 3.13-rc1 to
 get accepted as it's still being discussed.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iEYEABECAAYFAlJgHiwACgkQMUfUDdst+ykS3gCgiJqKAbzsb+hNiI/AXmCHtcWV
 cK4AoIEXbg+nMYPzSuSPz1nr2vJPr3CP
 =5WpE
 -----END PGP SIGNATURE-----

Merge tag 'char-misc-3.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull char/misc driver fixes from Greg KH:
 "Here are some small iio and w1 driver fixes for 3.12-rc6.

  There is also a hyper-v fix in here, which turned out to be incorrect,
  so it was reverted.  That will probably have to wait unto 3.13-rc1 to
  get accepted as it's still being discussed"

* tag 'char-misc-3.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  Revert "Drivers: hv: vmbus: Fix a bug in channel rescind code"
  Drivers: hv: vmbus: Fix a bug in channel rescind code
  iio:buffer: Free active scan mask in iio_disable_all_buffers()
  iio: frequency: adf4350: add missing clk_disable_unprepare() on error in adf4350_probe()
  w1 - call request_module with w1 master mutex unlocked
  w1 - fix fops in w1_bus_notify
2013-10-17 10:36:57 -07:00
Greg Kroah-Hartman e13cef8ded Third set of IIO fixes for the 3.12 cycle.
Two little ones this time:
 
 1) A missing clk_unprepare in adf4350.
 2) A missing free of the active_scan_mask when iio_disable_all_buffers is
 called during an unexpected device removal.  This leak was introduced by
 the fix
 a87c82e454 iio: Stop sampling when the device is removed
 and hence is a regression fix.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJSXbrBAAoJEFSFNJnE9BaILWgP/jMEnyNq4xImBkpLgYyJvF8F
 s4Pt8on4/F+JwV21gljJB8g8JiblSAECTbxFaUDCAV6ufJ/0djSwb0DDQ1JfdfGI
 a/2vC4YuhTGPi35s9NIXr9TuGS1cdYQ3o+bijNJiGJXIakI/ngwDWOpDE1MOFVv3
 0YVHKkhOARuObJ5L+5xYeCsGdNuv9eQ7SvhLyy1LJ4123wCu2cRKFBWP/UX9wJlF
 hLaeKXoR/jDiPaal6vIftLPDMsOILymUqjAy6QpQpDAp7zL9YenG8tSKiOWRgxE2
 gMfsbJks2KM7LyWY8i6tyF0ID62QYh2PMYEQVmKdOH7ffROeO1WamXshT2ls4X++
 +NB0Ih4cJFT2ryEGuG7R2isa36IP0KXTE2aPI2LmDHyJrHxxazfRooEOUks3gn+I
 P1RhkJTJ8It39EiV+DgzFowEi5kwolUBv+7y56eqQ1GBWVVyutr5mmN8WKhT7fjE
 3xMdaBCwbRCK6f/Kvl5TY4rIL8lG/aVP8X3bkJQFiduAtCrqphX+djFdCRn5nILZ
 FALZmNZn9tI47kksEy3L+WhiOGf/7h13jULF+EHgYDhJuJ/KT8AlggqQIh/AFXWF
 cDX92gC9mBCtlopYCLYh4ZDHr2L13X05W24irsIZak9TGEw8IXpPOWIqxUrLXMWl
 zyeW1/f8ZO7C0E+sV0gu
 =Whi7
 -----END PGP SIGNATURE-----

Merge tag 'iio-fixes-for-3.12c' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-linus

Jonathan writes:

Third set of IIO fixes for the 3.12 cycle.

Two little ones this time:

1) A missing clk_unprepare in adf4350.
2) A missing free of the active_scan_mask when iio_disable_all_buffers is
called during an unexpected device removal.  This leak was introduced by
the fix
a87c82e454 iio: Stop sampling when the device is removed
and hence is a regression fix.
2013-10-17 09:40:52 -07:00
Greg Kroah-Hartman b762799dd8 Revert "Drivers: hv: vmbus: Fix a bug in channel rescind code"
This reverts commit 90d33f3ec5 as it's not
the correct fix for this issue, and it causes a build warning to be
added to the kernel tree.

Cc: K. Y. Srinivasan <kys@microsoft.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 09:30:10 -07:00
Ashvini Varatharaj 8cedb1be2f Staging: sb105x: Removing trailing whitespaces
Fix checkpatch error : ERROR: trailing whitespace

Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 09:12:15 -07:00
Ashvini Varatharaj 40e4205ad6 Staging: wlan-ng: changing "* dev" to "*dev"
Fix checkpatch error: ERROR: "foo * bar" should be "foo *bar"

Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 09:12:15 -07:00
Archana kumari 3d47910be4 staging: dgnc: braces {} are not necessary for single statement in dgnc_cls.c
Fix checkpatch.pl issues with braces {} are not necessary
for single statement blocks in dgnc_cls.c

Signed-off-by: Archana kumari <archanakumari959@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 09:11:08 -07:00
Archana kumari 8009ae1a08 staging: vt6655: Fix Sparse Warning for Static Declarations
This patch fixes the Sparse Warning "symbol was not declared. Should it be
static?" in aes_ccmp.c

Signed-off-by: Archana kumari <archanakumari959@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 09:09:36 -07:00
Rashika Kheria d79a441151 Staging: lustre: Removal of Space between function name and parenthesis in timer.c
The patch fixes the following checkpatch.pl warning in timer.c-
WARNING: space prohibited between function name and open parenthesis '(

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 09:06:44 -07:00
Rashika Kheria b0834c8728 Staging: lustre: Removal of assignment in if condition in conrpc.c
This patch fixes the following checkpatch.pl error in conrpc.c-
ERROR: do not use assignment in if condition

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 09:06:44 -07:00
Rashika Kheria eac2e8c6f5 Staging: lustre: Fix quoted string split across lines in conrpc.c
This patch fixes the following checkpatch.pl warning in conrpc.c-
WARNING: quoted string split across lines conrpc.c

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 09:06:44 -07:00
Rashika Kheria fc831a9049 Staging: lustre: Fix Space Prohibition before '++' in conrpc.c
This patch fixes the following checkpatch.pl error in conrpc.c-
ERROR: space prohibited before that '++'

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 09:06:43 -07:00
Rashika Kheria 98d1bbddc6 Staging: lustre: Fix Space Requirement around ':' in conrpc.c
The patch fixes the following checkpatch.pl error in conrpc.c-
ERROR: spaces required around that ':'

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 09:06:43 -07:00
Rashika Kheria 4d72b5afc0 Staging: lustre: Removal of Space between function name and parenthesis in conrpc.c
The patch fixes the following checkpatch.pl warning in conrpc.c-
WARNING: space prohibited between function name and open parenthesis '('

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 09:06:43 -07:00
Rafael J. Wysocki 2421ad48f4 ACPI / PM: Drop two functions that are not used any more
Two functions defined in device_pm.c, acpi_dev_pm_add_dependent()
and acpi_dev_pm_remove_dependent(), have no callers and may be
dropped, so drop them.

Moreover, they are the only functions adding entries to and removing
entries from the power_dependent list in struct acpi_device, so drop
that list too.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-17 15:44:48 +02:00
Aaron Lu b08fc109ce ATA / ACPI: remove power dependent device handling
Previously, we wanted SCSI devices corrsponding to ATA devices to
be runtime resumed when the power resource for those ATA device was
turned on by some other device, so we added the SCSI device to the
dependent device list of the ATA device's ACPI node.  However, this
code has no effect after commit 41863fc (ACPI / power: Drop automaitc
resume of power resource dependent devices) and the mechanism it was
supposed to implement is regarded as a bad idea now, so drop it.

[rjw: Changelog]
Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-17 15:38:53 +02:00
Teodora Baluta f149080984 Staging: rtl8192u: use gfp_t instead of int
This patch fixes the following type of sparse warnings:

drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c:247:17: warning: incorrect type in argument 2 (different base types)
drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c:247:17:    expected restricted gfp_t [usertype] flags
drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c:247:17:    got int [signed] gfp_mask

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 18:53:42 -07:00
Teodora Baluta a115ee4175 Staging: rtl8192u: fix functions that should not be declared extern
These functions are already marked extern in the header file

drivers/staging/rtl8192u/r819xU_phy.c:1716:13: warning: function 'InitialGainOperateWorkItemCallBack' with external linkage has definition
drivers/staging/rtl8192u/r819xU_cmdpkt.c:497:12: warning: function 'cmpk_message_handle_rx' with external linkage has definition

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 18:51:26 -07:00
Rashika Kheria 1d612bd477 Staging: vt6655: Removal of Unused Function
This patch removes unused function 'RFbShutDown' from file rf.c

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 18:49:19 -07:00
Rashika Kheria 5da5804b9c Staging: vt6655: Fix Sparse Warning for Static Declarations
This patch fixes the following Sparse Warnings in rf.c:

drivers/staging/vt6655/rf.c:58:21: warning: symbol 'dwAL2230InitTable' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:76:21: warning: symbol 'dwAL2230ChannelTable0' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:93:21: warning: symbol 'dwAL2230ChannelTable1' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:110:15: warning: symbol 'dwAL2230PowerTable' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:180:21: warning: symbol 'dwAL7230InitTable' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:203:21: warning: symbol 'dwAL7230InitTableAMode' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:222:21: warning: symbol 'dwAL7230ChannelTable0' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:288:21: warning: symbol 'dwAL7230ChannelTable1' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:352:21: warning: symbol 'dwAL7230ChannelTable2' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:431:6: warning: symbol 's_bAL7230Init' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:474:6: warning: symbol 's_bAL7230SelectChannel' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:634:6: warning: symbol 'RFbAL2230Init' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:681:6: warning: symbol 'RFbAL2230SelectChannel' was not declared. Should it be static?

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 18:47:29 -07:00
Yasuaki Ishimatsu a37f86305c driver core: Release device_hotplug_lock when store_mem_state returns EINVAL
When inserting a wrong value to /sys/devices/system/memory/memoryX/state file,
following messages are shown. And device_hotplug_lock is never released.

================================================
[ BUG: lock held when returning to user space! ]
3.12.0-rc4-debug+ #3 Tainted: G        W
------------------------------------------------
bash/6442 is leaving the kernel with locks still held!
1 lock held by bash/6442:
 #0:  (device_hotplug_lock){+.+.+.}, at: [<ffffffff8146cbb5>] lock_device_hotplug_sysfs+0x15/0x50

This issue was introdued by commit fa2be40 (drivers: base: use standard
device online/offline for state change).

This patch releases device_hotplug_lcok when store_mem_state returns EINVAL.

Signed-off-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Reviewed-by: Toshi Kani <toshi.kani@hp.com>
CC: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 18:42:41 -07:00
Linus Torvalds 8359ffa565 A patch to avoid data corruption in a device-mapper snapshot.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJSXfiQAAoJEK2W1qbAHj1nNXUP/1hVfXVIBMXNRmxrM9FJ1Rdj
 Rg30aQK0qP6MkoPmjbdsPZmApq3uI++ihTPIhKQHrW70jjs1HsOAG5e9lHZXLx4b
 mt3+1PNheLMf+J6zzdk1qyWYXmzs1XU/MzlhpmmkCydO0X8ONmri75FqwCZlOB0H
 k/80Z8Q/3vva0pLsE5ubYlPiKoI1DPsUA9qO/Dkjh4QGDllsleVK5CjQPZiJJ4Ji
 FkAeBYdo3BZ6ivUXx4MJRDu7N1992XhVWabwU0bEoNAj2IjHiwT0rwsNoWxOYIim
 NsZFTboy/Aj3819w/QdqHKGEd4kd86MnxySkzK7/D57MRz6nqiwWGljGSIzth6ta
 uqJB7wuq3s/1p4MVaEnaCpm0QzquNt3lgP7bXGx94Qwq9oxdgyL8ndZHQv1SpagC
 gZT0PuFbg5XzpXt94XUeSODODnzG6SuBass5dxHHMrZdw/9hVPAavyyC+TcBIqLr
 6+8N4monhhNkZDUiUHIlTzk0YrmUDVfFlI8D7gj9mDBPf+qJsjBp8L6LdZeq0ZWs
 bC33oLQn/wEUv3Od1SQxMC34+xU65GT/raPg5H0xE0cRwKeloV7w9lKhiYLBbq5+
 1sKFJ/rll2cwZhpQ6UombkTzjGWK1JfsMnRFkM4B248qwf/QR9BWwLnNMP3tryyl
 smCkZ2DLncDKf7J8TN64
 =NRC3
 -----END PGP SIGNATURE-----

Merge tag 'dm-3.12-fix-cve' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm

Pull device-mapper fix from Alasdair Kergon:
 "A patch to avoid data corruption in a device-mapper snapshot.

  This is primarily a data corruption bug that all users of
  device-mapper snapshots will want to fix.  The CVE is due to a data
  leak under specific circumstances if, for example, the snapshot is
  presented to a virtual machine: a block written as data inside the VM
  can get interpreted incorrectly on the host outside the VM as
  metadata, causing the host to provide the VM with access to blocks it
  would not otherwise see.  This is likely to affect few, if any,
  people"

* tag 'dm-3.12-fix-cve' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
  dm snapshot: fix data corruption
2013-10-16 17:16:57 -07:00
Linus Torvalds 386aa05192 Three GPIO fixes for the v3.12 series:
- A fix to the Lynxpoint IRQ handler
 - Two late fixes to fallout from the gpiod refactoring
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJSXkvPAAoJEEEQszewGV1z+MUP/2ooJI2x0tm58NgJ34J1f+C4
 +lI0KKdNLrF9blxzOM6yHO1HaMD5NF2h4TkY4c/6WeJNyOVfcGko8wYaqKFEi3pa
 F30jn5wXFJfqMCP+lHKHQgqBfs+uYIt1jYuPcwu1ULkI8S1TGnU3p+9DuJuGDasD
 1XzNuAHcOHQOaTA90D5qCTJDRBFZUVgeIOqtHbIng7dL3pTDJdDkybvd2d+W7wKK
 +r/UpMTuxortVwcNfCRoI1lArnq+01cxwHhDSAuY7O0UujaQks34GWF4gIuKL0Kn
 PhXWLYQBzOKafVUdgzyyxFxw+F8dqpm8DaUZ3sKTXsa07IHMyqfSa6iUtJClqcZS
 +ukIdyL6nOAQVfNpyOGklaGcAhY5HFeYrrRmF9rxAygX9k4C0blbPNrL3vl5PrjH
 fiUu8pdyB4THzN1BsAjx4JTrzWyEr5ZIY+FuoTBQTUMcl3NfQ9US7wJPTqXH3217
 I6vOcxo4xohe4VWExg3yVZJ0QOjSvYzaiuv6n40zZi/oxymDnD/huuFpVs3u/5+X
 4C5zpfZweNYnwHiUGl6dVMfenTGVY8MWcg1fQumsBfa2Rb3BJT5JdxeRGtg/muFN
 n6jm3kzr6F5VVBG5o6aKtEjnxdSncjXX9U85EDpFv4Hrf5fXRKwV+1rhXD3akj6D
 FcpwXlCt0Zf3YXlabbMM
 =SG11
 -----END PGP SIGNATURE-----

Merge tag 'gpio-v3.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio

Pull gpio fixes from Linus Walleij:
 "Three GPIO fixes for the v3.12 series:
   - A fix to the Lynxpoint IRQ handler
   - Two late fixes to fallout from the gpiod refactoring"

* tag 'gpio-v3.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
  gpiolib: let gpiod_request() return -EPROBE_DEFER
  gpiolib: safer implementation of desc_to_gpio()
  gpio/lynxpoint: check if the interrupt is enabled in IRQ handler
2013-10-16 17:15:57 -07:00
Charles Keepax 0e8244322b cpufreq: s3c64xx: Rename index to driver_data
The index field of cpufreq_frequency_table has been renamed to
driver_data by commit 5070158 (cpufreq: rename index as driver_data
in cpufreq_frequency_table).

This patch updates the s3c64xx driver to match.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Cc: 3.11+ <stable@vger.kernel.org> # 3.11+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-16 23:53:38 +02:00
Rafael J. Wysocki 41863fcee3 ACPI / power: Drop automaitc resume of power resource dependent devices
The mechanism causing devices depending on a given power resource
(that is, devices that can be in D0 only if that power resource is
on) to be resumed automatically when the power resource is turned
on (and their "inferred" power state becomes D0 as a result) is
inherently racy and in fact unnecessary.

It is racy, because if the power resource is turned on and then
immediately off, the device resume triggered by the first transition
to "on" may still happen, causing the power resource to be turned
on again.  That again will trigger the "resume of dependent devices"
mechanism, but if the devices in question are not in use, they will
be suspended in the meantime causing the power resource to be turned
off.  However, the "resume of dependent devices" will next resume
them again and so on.  In some cases (USB port PM in particular) that
leads to an endless busy loop of flipping the resource on and off
continuously.

It is needless, because whoever turns a power resource on will most
likely turn it off at some point and the devices that go into "D0"
as a result of turning it on will then go back into D3cold
(generally, the state they were in before).

Moreover, turning on all power resources a device needs to go into
D0 is not sufficient for a full transition into D0 in general.
Namely, _PS0 may need to be executed in addition to that in some
cases.  This means that the whole rationale of the "resume of
dependent devices" mechanism was incorrect to begin with and it's
best to remove it entirely.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-16 23:05:42 +02:00
Rafael J. Wysocki 09c87e2f79 intel_pstate: Fix type mismatch warning
The expression in line 398 of intel_pstate.c causes the following
warning to be emitted:

drivers/cpufreq/intel_pstate.c:398:3: warning: left shift count >= width of type

which happens because unsigned long is 32-bit on some architectures.

Fix that by using a helper u64 variable and simplify the code
slightly.

Tested-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-16 22:59:33 +02:00
K. Y. Srinivasan 90d33f3ec5 Drivers: hv: vmbus: Fix a bug in channel rescind code
Rescind of subchannels were not being correctly handled. Fix the bug.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Cc: <stable@vger.kernel.org>        [3.11+]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 13:55:46 -07:00
Matthew Dawson eea88512f8 usb: misc: usb3503: Fix compile error due to incorrect regmap depedency
The USB3503 driver had an incorrect depedency on REGMAP, instead of
REGMAP_I2C.  This caused the build to fail since the necessary regmap
i2c pieces were not available.

Signed-off-by: Matthew Dawson <matthew@mjdsystems.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 13:52:16 -07:00
Russell King - ARM Linux 41314fea2f usb/chipidea: fix oops on memory allocation failure
When CMA fails to initialize in v3.12-rc4, the chipidea driver oopses
the kernel while trying to remove and put the HCD which doesn't exist:

WARNING: CPU: 0 PID: 6 at /home/rmk/git/linux-rmk/arch/arm/mm/dma-mapping.c:511
__dma_alloc+0x200/0x240()
coherent pool not initialised!
Modules linked in:
CPU: 0 PID: 6 Comm: kworker/u2:0 Tainted: G        W    3.12.0-rc4+ #56
Workqueue: deferwq deferred_probe_work_func
Backtrace:
[<c001218c>] (dump_backtrace+0x0/0x10c) from [<c0012328>] (show_stack+0x18/0x1c)
 r6:c05fd9cc r5:000001ff r4:00000000 r3:df86ad00
[<c0012310>] (show_stack+0x0/0x1c) from [<c05f3a4c>] (dump_stack+0x70/0x8c)
[<c05f39dc>] (dump_stack+0x0/0x8c) from [<c00230a8>] (warn_slowpath_common+0x6c/0x8c)
 r4:df883a60 r3:df86ad00
[<c002303c>] (warn_slowpath_common+0x0/0x8c) from [<c002316c>] (warn_slowpath_fmt+0x38/0x40)
 r8:ffffffff r7:00001000 r6:c083b808 r5:00000000 r4:df2efe80
[<c0023134>] (warn_slowpath_fmt+0x0/0x40) from [<c00196bc>] (__dma_alloc+0x200/0x240)
 r3:00000000 r2:c05fda00
[<c00194bc>] (__dma_alloc+0x0/0x240) from [<c001982c>] (arm_dma_alloc+0x88/0xa0)
[<c00197a4>] (arm_dma_alloc+0x0/0xa0) from [<c03e2904>] (ehci_setup+0x1f4/0x438)
[<c03e2710>] (ehci_setup+0x0/0x438) from [<c03cbd60>] (usb_add_hcd+0x18c/0x664)
[<c03cbbd4>] (usb_add_hcd+0x0/0x664) from [<c03e89f4>] (host_start+0xf0/0x180)
[<c03e8904>] (host_start+0x0/0x180) from [<c03e7c34>] (ci_hdrc_probe+0x360/0x670
)
 r6:df2ef410 r5:00000000 r4:df2c3010 r3:c03e8904
[<c03e78d4>] (ci_hdrc_probe+0x0/0x670) from [<c0311044>] (platform_drv_probe+0x20/0x24)
[<c0311024>] (platform_drv_probe+0x0/0x24) from [<c030fcac>] (driver_probe_device+0x9c/0x234)
...
---[ end trace c88ccaf3969e8422 ]---
Unable to handle kernel NULL pointer dereference at virtual address 00000028
pgd = c0004000
[00000028] *pgd=00000000
Internal error: Oops: 17 [#1] SMP ARM
Modules linked in:
CPU: 0 PID: 6 Comm: kworker/u2:0 Tainted: G        W    3.12.0-rc4+ #56
Workqueue: deferwq deferred_probe_work_func
task: df86ad00 ti: df882000 task.ti: df882000
PC is at usb_remove_hcd+0x10/0x150
LR is at host_stop+0x1c/0x3c
pc : [<c03cacec>]    lr : [<c03e88e4>]    psr: 60000013
sp : df883b50  ip : df883b78  fp : df883b74
r10: c11f4c54  r9 : c0836450  r8 : df30c400
r7 : fffffff4  r6 : df2ef410  r5 : 00000000  r4 : df2c3010
r3 : 00000000  r2 : 00000000  r1 : df86b0a0  r0 : 00000000
Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 10c53c7d  Table: 2f29404a  DAC: 00000015
Process kworker/u2:0 (pid: 6, stack limit = 0xdf882240)
Stack: (0xdf883b50 to 0xdf884000)
...
Backtrace:
[<c03cacdc>] (usb_remove_hcd+0x0/0x150) from [<c03e88e4>] (host_stop+0x1c/0x3c)
 r6:df2ef410 r5:00000000 r4:df2c3010
[<c03e88c8>] (host_stop+0x0/0x3c) from [<c03e8aa0>] (ci_hdrc_host_destroy+0x1c/0x20)
 r5:00000000 r4:df2c3010
[<c03e8a84>] (ci_hdrc_host_destroy+0x0/0x20) from [<c03e7c80>] (ci_hdrc_probe+0x3ac/0x670)
[<c03e78d4>] (ci_hdrc_probe+0x0/0x670) from [<c0311044>] (platform_drv_probe+0x20/0x24)
[<c0311024>] (platform_drv_probe+0x0/0x24) from [<c030fcac>] (driver_probe_device+0x9c/0x234)
[<c030fc10>] (driver_probe_device+0x0/0x234) from [<c030ff28>] (__device_attach+0x44/0x48)
...
---[ end trace c88ccaf3969e8423 ]---

Fix this so at least we can continue booting and get to a shell prompt.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tested-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 13:52:16 -07:00
Oliver Neukum 32c37fc30c usb-storage: add quirk for mandatory READ_CAPACITY_16
Some USB drive enclosures do not correctly report an
overflow condition if they hold a drive with a capacity
over 2TB and are confronted with a READ_CAPACITY_10.
They answer with their capacity modulo 2TB.
The generic layer cannot cope with that. It must be told
to use READ_CAPACITY_16 from the beginning.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 13:32:04 -07:00
Enrico Mioso fd8573f582 usb: serial: option: blacklist Olivetti Olicard200
Interface 6 of this device speaks QMI as per tests done by us.
Credits go to Antonella for providing the hardware.

Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com>
Signed-off-by: Antonella Pellizzari <anto.pellizzari83@gmail.com>
Tested-by: Dan Williams <dcbw@redhat.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 13:24:39 -07:00
Roel Kluin d969de8d83 serial: vt8500: add missing braces
Due to missing braces on an if statement, in presence of a device_node a
port was always assigned -1, regardless of any alias entries in the
device tree. Conversely, if device_node was NULL, an unitialized port
ended up being used.

This patch adds the missing braces, fixing the issues.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Tony Prisk <linux@prisktech.co.nz>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 13:22:16 -07:00
Ian Abbott f1d376beae staging: comedi: usbduxsigma: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Use unsigned types consistently for handling comedi sample data and also
for the USB data buffers.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:32 -07:00
Ian Abbott 470180c611 staging: comedi: usbdux: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Use unsigned types consistently for handling comedi sample data and also
for the USB data buffers.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:32 -07:00
Ian Abbott 5fd4b711be staging: comedi: s626: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Use unsigned types consistently in the "s626" module when dealing with
sample values.

Rewrite `s626_reg_to_uint()` as it can be done with a one-liner.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:32 -07:00
Ian Abbott 055a1e2c56 staging: comedi: rtd520: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Use unsigned types for sample value manipulations in the "rtd520" driver
for consistency.

Also replace the hand-coded munging of 2's complement sample values with
calls to `comedi_offset_munge()` and AND with `s->maxdata` to strip off
any extra sign bits.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:31 -07:00
Ian Abbott 8bab0d680e staging: comedi: quatech_daqp_cs: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change `daqp_interrupt()` to use unsigned sample values for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:31 -07:00
Ian Abbott 5c174c41d8 staging: comedi: pcmuio: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change `pcmuio_handle_intr_subdev()` in the "pcmuio" module to use
unsigned sample values for consistency.

Also, make the order in which `pcmuio_handle_intr_subdev()` writes the
two sample values (each actually containing up to 16 1-bit sample
values) independent of the host byte ordering.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:31 -07:00
Ian Abbott f23b65a588 staging: comedi: pcmmio: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change `interrupt_pcmmio()` and `ai_rinsn()` in the "pcmmio" module to
use unsigned sample values for consistency.

Also, make the order in which `interrupt_pcmmio()` writes the two sample
values (each actually containing up to 16 1-bit sample values)
independent of the host byte ordering.

Note that this module is a mess, so please excuse the checkpatch
warnings.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:31 -07:00
Ian Abbott 4bf59ce248 staging: comedi: pcl818: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the interrupt data transfer functions in the "pcl818" module to
use unsigned types for consistency.

Also remove the `short *ai_data` member of `struct pcl818_private` as it
is only assigned to and otherwise unused.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:31 -07:00
Ian Abbott 54d2dd8443 staging: comedi: pcl816: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the "pcl816" module to use unsigned types to handle samples for
consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:31 -07:00
Ian Abbott 8017c51305 staging: comedi: pcl812: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change `transfer_from_dma_buf()` and `interrupt_pcl812_ai_dma()` in the
"pcl812" module to use `unsigned short` sample values for consistency.

Also remove the `short *ai_data` member of `struct pcl812_private` as it
is only assigned to.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:30 -07:00
Ian Abbott b12bb4a5f3 staging: comedi: pcl711: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Don't cast the sample value parameter of `comedi_buf_put()` to `short`,
particularly as it has now been changed to `unsigned short`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:30 -07:00
Ian Abbott 319b67ae1c staging: comedi: ni_pcidio: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change `nidio_interrupt()` to use unsigned types for sample values
(actually bit-vectors of 1-bit sample values) instead of signed types.

Also rename the `AuxData` variable to `auxdata` and change it from
`long` to `unsigned int` as it only needs to hold a 32-bit value.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:30 -07:00
Ian Abbott 3a2b101cc5 staging: comedi: ni_mio_common: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the element type of the `ai_fifo_buffer[]` element of `struct
ni_board_struct` and the types of various local variables from `short`
to `unsigned short` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:30 -07:00
Ian Abbott c0edd2c627 staging: comedi: ni_labpc: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the type of the `data` variable in `labpc_ai_cmd()` from `short`
to `unsigned short` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:30 -07:00
Ian Abbott 2fb5cd385c staging: comedi: ni_at_a2150: sample types are unsigned
Sample values in comedi are generally represented by unsigned values.
Change the type of the `dma_buffer` member of `struct a2150_private`
from `s16 *` to `uint16_t *`, and change the type of the `dpnt` variable
in `a2150_interrupt()` to `unsigned short` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:29 -07:00
Ian Abbott ac2832f859 staging: comedi: me4000: sample types are unsigned (and not long!)
Sample values in comedi are generally represented as unsigned values.
Change the types of various variables in the "me4000" driver dealing
with samples to use unsigned types for consistency.

Also replace the `long` or `unsigned long` variables used to handle
32-bit register values to `unsigned int`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:29 -07:00
Ian Abbott 22d1b0650a staging: comedi: icp_multi: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the element type of the `ao_data[]` member of `struct
icp_multi_private` from `short` to `unsigned short` for consistency.

Also remove the `ai_data` and `di_data` members as they are not used.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:29 -07:00
Ian Abbott 58f91823de staging: comedi: fl512: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the element type of the `ao_readback[]` member of `struct
fl512_private` from `short` to `unsigned short` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:29 -07:00
Ian Abbott 37a96e994c staging: comedi: dt3000: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the type of the `data` variable in `dt3k_ai_empty_fifo()` from
`short` to `unsigned short` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:23 -07:00
Ian Abbott 766b1f95cf staging: comedi: dt282x: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change various members of `struct dt282x_private` and various parameters
and variables dealing with samples to use `unsigned short` instead of
`short` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:19 -07:00
Ian Abbott 65a62aaec2 staging: comedi: das1800: sample types are unsigned
Sample values in comedi are generally represented by unsigned values.
Change the type of the `ao_update_bits` member of `struct
das1800_private` and the types of various local variables used to hold
sample values from `short` to `unsigned short` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:19 -07:00
Ian Abbott eabbf3f43f staging: comedi: das16m1: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the element type of the `ai_buffer[]` member of `struct
das16m1_private_struct` and the types used by `munge_sample()` and
`munge_sample_array()` from `short` to `unsigned short` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:19 -07:00
Ian Abbott 920983458c staging: comedi: das16: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the type of the `data` variable in `das16_ai_munge()` from `short
*` to `unsigned short *` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:18 -07:00
Ian Abbott 0522063806 staging: comedi: cb_pcidas64: sample types are unsigned
Sample values in comedi are unsigned.  Change the element type of
`ao_bounce_buffer[]` in `struct pcidas64_private` from `short` to
`unsigned short` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:18 -07:00
Ian Abbott 79e3b11987 staging: comedi: cb_pcidas: sample types are unsigned
Sample values in comedi are generally represented by unsigned values.
Change the element types of `ai_buffer[]`, `ao_buffer[]` and
`ao_value[]` in `struct cb_pcidas_private` to `unsigned short` for
consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:18 -07:00
Ian Abbott 863e52769d staging: comedi: amplc_pci230: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Replace all uses of `short` to handle sample values in the
"amplc_pci230" driver with `unsigned short` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:18 -07:00
Ian Abbott b6b40b67a9 staging: comedi: amplc_pci224: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the type of the `ao_scan_vals` member of `struct pci224_private`
from `short *` to `unsigned short *` for consistency.  Also change the
type of the `array` variable in `pci224_ao_munge()` from `short *` to
`unsigned short *`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:18 -07:00
Ian Abbott 6916308938 staging: comedi: adv_pci1723: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the element type of the `ao_data[]` member of `struct
pci1723_private` from `short` to `unsigned short` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:18 -07:00
Ian Abbott e3a9e513c6 staging: comedi: adv_pci1710: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the element type of the `ao_data[]` member of `struct
pci1710_private` from `short` to `unsigned short` for consistency.  Also
remove the `ai_data` member as it is only assigned to.  Change various
local variables used to hold sample values to `unsigned short`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:17 -07:00
Ian Abbott 6cda0d26b1 staging: comedi: adl_pci9118: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the `ao_data[]` and `dmabuf_virt[]` members of `struct
pci9118_private` and various local variables dealing with sample values
to use `unsigned short` instead of `short` for consistency.

Also remove the `short *ai_data` member of `struct pci9118_private` as
it is only assigned to.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:17 -07:00
Ian Abbott b909ba8f8b staging: comedi: adl_pci9111: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the element type of the `ai_bounce_buffer[]` member of `struct
pci9111_private_data` from `short` to `unsigned short` for consistency.
Also change the type of the `array` variable in `pci9111_ai_munge()`
from `short *` to `unsigned short *`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:17 -07:00
Ian Abbott 58a37d4186 staging: comedi: addi_apci_3120: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
Change the element type of `ul_DmaBufferVirtual[2]` in `struct
addi_private` from `short *` to `unsigned short *` for consistency.
Note that several ADDI-DATA drivers use this struct from
"addi_common.h", but only the "addi_apci_3120" driver uses this member.
Also change the type of the `dma_buffer` parameter of
`v_APCI3120_InterruptDmaMoveBlock16bit()` from `short *` to `unsigned
short *`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:17 -07:00
Ian Abbott 830e273c0e staging: comedi: 8255: sample types are unsigned
Sample values in comedi are generally represented as unsigned values.
`subdev_8255_interrupt()` calls `comedi_buf_put()` with a `short` data
value merely because that's what was previously expected.  Since it now
expects an `unsigned short`, change it here for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:17 -07:00
Ian Abbott ca05b81334 staging: comedi: use unsigned sample in cfc_write_to_buffer()
Sample values in comedi are generally represented as unsigned values.
`cfc_write_to_buffer()` in "comedi_fc.h" currently uses `short` to hold
a 16-bit sample value to be written to the buffer.  Change the type of
the parameter to `unsigned short` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:16 -07:00
Ian Abbott 0a6fd02c1c staging: comedi: use unsigned samples for comedi_buf_put()/get()
Sample values in comedi are generally represented as unsigned values.
`comedi_buf_put()` and `comedi_buf_get()` use a `short` to hold the
16-bit data value being transferred to or from the comedi buffer.
Change them to use `unsigned short` for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:48:16 -07:00
Malcolm Priestley 3ba0938c16 staging: vt6656: rxtx.c s_vFillTxKey replace u8 *pbyBuf.
Replace with struct vnt_tx_fifo_head and attach pbyBuf to
adwTxKey[0]

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:45:50 -07:00
Malcolm Priestley ecd80240af staging: vt6656: rxtx.c clean up s_uGetRTSCTSDuration
White space clean up.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:40:37 -07:00
Malcolm Priestley 3dec8f1654 staging: vt6656: rxtx.c s_uGetRTSCTSDuration allow fall-through duplicates
Allow switch fall-through of duplicate case.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:40:37 -07:00
Malcolm Priestley f84cdf65a7 staging: vt6656: rxtx.c s_bPacketToWirelessUsb set fallback tx rates
Set the two TX fall back rates in s_bPacketToWirelessUsb and
pass to private area of driver in variables tx_rate_fb0
and tx_rate_fb1 from the wFB_Opt0/wFB_Opt1 array.

Apply these rates were needed in the TX structure and
remove byFBOption settings in s_uGetRTSCTSDuration.

This greatly simplifies s_uGetRTSCTSDuration and
more future flexibility of setting rates from
upper levels of driver.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:40:36 -07:00
Lars-Peter Clausen bf741c08af iio: Remove unused iio_sw_buffer_preenable()
The functionality implemented by iio_sw_buffer_preenable() is now done directly
in the IIO core and previous users of iio_sw_buffer_preenable() have all been
updated to not use it anymore. It is unused now and can be remove.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-16 19:17:06 +01:00
Lars-Peter Clausen 889a62ba6d staging:iio:ade7758: Remove redundant call to iio_sw_buffer_preenable()
The equivalent of iio_sw_buffer_preenable() is now done in the IIO buffer core,
so there is no need to do this from the driver anymore.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-16 19:16:15 +01:00
Lars-Peter Clausen 75b19bbf22 staging:iio:ad5933: Remove redundant call to iio_sw_buffer_preenable()
The equivalent of iio_sw_buffer_preenable() is now done in the IIO buffer core,
so there is no need to do this from the driver anymore.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-16 19:16:15 +01:00
Lars-Peter Clausen 29da147245 staging:iio:simple-dummy: Remove redundant call to iio_sw_buffer_preenable()
The equivalent of iio_sw_buffer_preenable() is now done in the IIO buffer core,
so there is no need to do this from the driver anymore.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-16 19:15:40 +01:00