Commit graph

197979 commits

Author SHA1 Message Date
Lars-Peter Clausen 7197812187 staging:iio:mxs-lradc: 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>
Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-16 19:13:57 +01:00
Lars-Peter Clausen 77e587f676 staging:iio:lis3l02dq: 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:13:57 +01:00
Lars-Peter Clausen 1e61fb7b19 iio:gp2ap020a00f: 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>
Cc: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-16 19:13:57 +01:00
Lars-Peter Clausen 6c0743ed99 iio:st_pressure: 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>
Cc: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-16 19:13:56 +01:00
Lars-Peter Clausen bbc1751d24 iio:st_magn: 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>
Cc: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-16 19:13:50 +01:00
Lars-Peter Clausen c80b8ea9b4 iio:triggered-buffer: 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:12:47 +01:00
Lars-Peter Clausen d4b2911b1f iio:st_gyro: 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>
Cc: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-16 19:12:46 +01:00
Lars-Peter Clausen 24adaf7958 iio:ti_am335x: 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>
Cc: Zubair Lutfullah <zubair.lutfullah@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-16 19:12:46 +01:00
Lars-Peter Clausen eddcee851a iio:ad_sigma_delta: 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:12:40 +01:00
Lars-Peter Clausen 41288e0f62 iio:ad7887: 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:12:04 +01:00
Lars-Peter Clausen 06e1b542bb iio:ad7266: Remove redundant call to iio_sw_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:11:31 +01:00
Lars-Peter Clausen d0894cab0f iio:st_accel: Drop 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>
Cc: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-16 19:11:11 +01:00
Lars-Peter Clausen 8e050996c8 iio: Update buffer's bytes per datum after updating the scan mask
Currently a IIO device driver needs to make sure to update the buffer's bytes
per datum after the scan mask has changed. This is usually done in the preenable
callback by invoking iio_sw_buffer_preenable(). This is something that needs to
be done and is done for virtually all devices which support buffers (we
currently have only one exception). Also this a bit of a layering violation
since we have to call the buffer setup ops from the device setup ops. This
requires the device driver to know about the internal requirements of the buffer
(e.g. whether we need to call the set_bytes_per_datum) callback. And especially
with in-kernel buffer consumers, which allows to attach arbitrary buffers to a
device, this is something that the driver can't know.

Moving this to the core allows us to drop the individual calls to
iio_sw_buffer_preenable() from drivers.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Denis Ciocca <denis.ciocca@st.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Zubair Lutfullah <zubair.lutfullah@gmail.com>
Cc: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-16 19:09:27 +01:00
Oliver Neukum 614ced91fc USB: quirks: add touchscreen that is dazzeled by remote wakeup
The device descriptors are messed up after remote wakeup

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 10:21:07 -07:00
Archana kumari 4a75ffa8ad staging:dgnc:Fixes use of deprecated headers in dgnc_cls.c
Fixes use of deprecated header <asm/io.h> in staging:dgnc:dgnc_cls.c

Signed-off-by: Archana kumari <archanakumari959@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 09:42:42 -07:00
Teodora Baluta 57a8852912 Staging: rtl8192u: fix checkpatch.pl error
This patch fixes the checkpatch.pl script error:
ERROR: do not use C99 // comments
+static long ieee80211_translate_todbm(u8 signal_strength_index)// 0-100
index.

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 09:40:30 -07:00
Teodora Baluta 46326d2622 Staging: rtl8192u: fix sparse warnings for static functions
Fix sparse warnings in static function in driver rtl8192u

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 09:39:32 -07:00
Kelley Nielsen 4b31e1f8ff staging: ft1000: change scram_dnldr() header to one line comment in ft1000_download.c
As per coding style,C99 comments are not allowed
also, the formal header contained empty space and
redundant information that's right there in the function

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 09:36:13 -07:00
Kelley Nielsen 456ae7ebfd staging: ft1000: change write_block_fifo() header to /* */ style in ft1000_download.c
As per coding style, C99 comments are not allowed
removed some redundant information and empty space
Left the parameter descriptions because the
parameter list is long and cryptic looking

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 09:36:12 -07:00
Kelley Nielsen 69f7be1fba staging: ft1000: change write_blk header to /* */ style in ft1000_download.c
As per coding style, C99 comments are not allowed
removed some redundant information and empty space
Left the parameter descriptions because the
parameter list is long and cryptic looking

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 09:36:12 -07:00
Kelley Nielsen b30f4e234f staging: ft1000: change hdr_checksum() header to one line comment in ft1000_download.c
As per coding style,C99 comments are not allowed
also, the formal header contained empty space and
redundant information that's right there in the function

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 09:36:12 -07:00
Kelley Nielsen 9e80d03c75 staging: ft1000: change put_request_value() header to single line comment in ft1000_download.c
As per coding style,C99 comments are not allowed
also, the formal header contained empty space and
redundant information that's right there in the function

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 09:36:12 -07:00
Rashika Kheria 7ed57bca58 Staging: btmtk_usb: Fix Sparse Warning of incorrect type in assignment
This patch fixes the following Sparse Warnings in btmtk_usb.c:

drivers/staging/btmtk_usb/btmtk_usb.c:676:39: warning: incorrect type in assignment (different base types)
drivers/staging/btmtk_usb/btmtk_usb.c:676:39:    expected unsigned int [unsigned] [usertype] packet_header
drivers/staging/btmtk_usb/btmtk_usb.c:676:39:    got restricted __le32 [usertype] <noident>

drivers/staging/btmtk_usb/btmtk_usb.c:736:31: warning: incorrect type in assignment (different base types)
drivers/staging/btmtk_usb/btmtk_usb.c:736:31:    expected unsigned int [unsigned] [addressable] [usertype] packet_header
drivers/staging/btmtk_usb/btmtk_usb.c:736:31:    got restricted __le32 [usertype] <noident>

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 09:32:28 -07:00
Nandini Hanumanthagowda c744fd5fa8 staging: vt6656: Removed checkpatch whitespace errors
Removed whitespace related errors and warnings by removing
unnecessary spaces before new line in the quoted string
and spaces at start of any line or before tab to comply
with the coding style.

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 09:26:20 -07:00
Nandini Hanumanthagowda a96f5ba6f9 staging: vt6656: removed space related checkpatch warnings
Removed spaces around operators where it was not required
as per coding style
Added spaces around operators where it was necessary as
per coding style

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 09:26:20 -07:00
Mikulas Patocka e9c6a18264 dm snapshot: fix data corruption
This patch fixes a particular type of data corruption that has been
encountered when loading a snapshot's metadata from disk.

When we allocate a new chunk in persistent_prepare, we increment
ps->next_free and we make sure that it doesn't point to a metadata area
by further incrementing it if necessary.

When we load metadata from disk on device activation, ps->next_free is
positioned after the last used data chunk. However, if this last used
data chunk is followed by a metadata area, ps->next_free is positioned
erroneously to the metadata area. A newly-allocated chunk is placed at
the same location as the metadata area, resulting in data or metadata
corruption.

This patch changes the code so that ps->next_free skips the metadata
area when metadata are loaded in function read_exceptions.

The patch also moves a piece of code from persistent_prepare_exception
to a separate function skip_metadata to avoid code duplication.

CVE-2013-4299

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: stable@vger.kernel.org
Cc: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2013-10-16 03:17:47 +01:00
Linus Torvalds 34ec4de42b Device tree fixes and reverts for v3.12-rc5
One bug fix and three reverts. The reverts back out the slightly
 controversial feeding the entire device tree into the random pool and
 the reserved-memory binding which isn't fully baked yet. Expect the
 reserved-memory patches at least to resurface for v3.13. The bug fixes
 removes a scary but harmless warning on SPARC that was introduced in the
 v3.12 merge window. v3.13 will contain a proper fix that makes the new
 code work on SPARC.
 
 On the plus side, the diffstat looks *awesome*. I love removing lines of code.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQEcBAABAgAGBQJSXbO9AAoJEJZcAETA+ZUxuH4IAI/KF71fq0/O7en7GHo6ofcZ
 3nA3fUyYpnjehaqmKDXxix4TUgKTYU1ZP6tn8VfM6fn0QthR2YXPYAqiIaRot3ab
 arCPvJ9N52CU04Ug8dqMPEuFlSqRfTYc0EVPTbdgv8GYWX+rjP4qmOWS13exorai
 hJSRFmbyvwOVvRAl7KtkBPEZ3ri40mfkTrMs61v55GajhaZFyoTQgMMNhboUskI7
 qztWiecw1stlvbfQEoN+BA11ohp5kDf4d5jeTCMNFx81liBbZHYfwWbmwYPCH7/z
 6s4gX6PQeCuygdhQK65q1tYebTmRbFxkuf8P/tO7lEpmR3fKIVBr+oMJff0q9ww=
 =8W6e
 -----END PGP SIGNATURE-----

Merge tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux

Pull device tree fixes and reverts from Grant Likely:
 "One bug fix and three reverts.  The reverts back out the slightly
  controversial feeding the entire device tree into the random pool and
  the reserved-memory binding which isn't fully baked yet.  Expect the
  reserved-memory patches at least to resurface for v3.13.

  The bug fixes removes a scary but harmless warning on SPARC that was
  introduced in the v3.12 merge window.  v3.13 will contain a proper fix
  that makes the new code work on SPARC.

  On the plus side, the diffstat looks *awesome*.  I love removing lines
  of code"

* tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux:
  Revert "drivers: of: add initialization code for dma reserved memory"
  Revert "ARM: init: add support for reserved memory defined by device tree"
  Revert "of: Feed entire flattened device tree into the random pool"
  of: fix unnecessary warning on missing /cpus node
2013-10-15 17:14:13 -07:00
Dirk Brandewie 52e0a509e5 cpufreq / intel_pstate: Fix max_perf_pct on resume
If the system is suspended while max_perf_pct is less than 100 percent
or no_turbo set policy->{min,max} will be set incorrectly with scaled
values which turn the scaled values into hard limits.

References: https://bugzilla.kernel.org/show_bug.cgi?id=61241
Reported-by: Patrick Bartels <petzicus@googlemail.com>
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Cc: 3.9+ <stable@vger.kernel.org> # 3.9+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-16 01:41:46 +02:00
Linus Torvalds 36704263f1 A small fix for Xen on x86_32 and a build fix for xen-tpmfront on arm64.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iQIcBAABAgAGBQJSXSSbAAoJEIlPj0hw4a6QkIoQAMe69LtP8x4l7ZfgqT/QxwHK
 COGw+KpPXZPxASpCJO9aTXW/Mr54X9BpC4if6OmpRA6BXyU2sTrp2TIeuPbZCFvg
 DjFy4g6Snd9yvb0FPbIcUbMbUZUWmLA05PstUZV+FNub2l9ie7WWzfjyVNQv/izA
 AJ6J5GDSPxHegoygeBCCrn0Qc5rgN6soxhRDndmVGLxlBNRs71ORojRMGUrWY2X/
 OhxSj97hCXZHZyaQBI2JfuNzmFAVGvdLVN3NGzROKK1u8zKGn1I1kL39OU1QkCHZ
 iUmBeJt7jzetS85XcDxCzcErWs6K6HjFqiSF1tC6GGOtX73oqNqV4weIzNSdO+lc
 tLUGDfJSJdaVB6tNoGsywqx380CHyJi6WjUR21o2RSW8TtsNrzkpqLE0Aqv84tnl
 dyTgykzmpKhtmchjHHO4mGDioCRDYLcok3gol2IRc6P+BYXzHgwvWkH/TWMhvVjK
 IHGTd+cuUqrs7MmuxGZ/kQiqV6OegdFZYrW6E6vulITUMWNPxUaXFBu9njzrMxGt
 2bLeC+xDTi2BW9ihaln+zVUxmHZ2TLq6fHMZ/XTWrwGNNdUhKU/jNIWqC25MxSX8
 vOVnCLvT+AqqSU82ng3JL5LvnZFGlAd/cUdVEdo723xRNz6OgWLbrhi7Pq/OkjIJ
 9VKoA3zX8mgiMl1Wgp9t
 =wJOk
 -----END PGP SIGNATURE-----

Merge tag 'stable/for-linus-3.12-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip

Pull Xen fixes from Stefano Stabellini:
 "A small fix for Xen on x86_32 and a build fix for xen-tpmfront on
  arm64"

* tag 'stable/for-linus-3.12-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
  xen: Fix possible user space selector corruption
  tpm: xen-tpmfront: fix missing declaration of xen_domain
2013-10-15 16:22:11 -07:00
Krzysztof Mazur 7d13f94ce2 ACPI: remove /proc/acpi/event from ACPI_BUTTON help
Commit 1696d9d (ACPI: Remove the old /proc/acpi/event interface)
left /proc/acpi/event in the ACPI_BUTTON help in Kconfig, so
remove it from there.

[rjw: Changelog]
Signed-off-by: Krzysztof Mazur <krzysiek@podlesie.net>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-16 00:31:47 +02:00
Lan Tianyu d7d49012b9 ACPI / power: Release resource_lock after acpi_power_get_state() return error
In acpi_resume_power_resources() resource_lock should be released
when acpi_power_get_state() fails and before passing to next power
resource on the list.

Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-16 00:26:42 +02:00
Archana kumari 2db0083d90 staging:netlogic:Fixes commenting style in xlr_net.c
Fixes commenting style in xlr_net.c mentioned in
drivers:staging:netlogic:TODO file

Signed-off-by: Archana kumari <archanakumari959@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-15 12:27:11 -07:00
Randy Dunlap d6ae99d04e staging/olpc_dcon: fix kconfig to fix build errors
Fix build errors when GPIO_CS5535=m and FB_OLPC_DCON=y
by preventing that kconfig combination.

These build errors are caused by having a kconfig bool symbol
(FB_OLPC_DCON_1) that depend on a tristate symbol (GPIO_CS5535),
but when the tristate symbol is =m, the bool symbol is =y.

  drivers/built-in.o: In function `dcon_read_status_xo_1':
  olpc_dcon_xo_1.c:(.text+0x359531): undefined reference to `cs5535_gpio_set'
  drivers/built-in.o: In function `dcon_wiggle_xo_1':
  olpc_dcon_xo_1.c:(.text+0x35959f): undefined reference to `cs5535_gpio_set'
  olpc_dcon_xo_1.c:(.text+0x359610): undefined reference to `cs5535_gpio_clear'
  drivers/built-in.o:olpc_dcon_xo_1.c:(.text+0x3596a1): more undefined references to `cs5535_gpio_clear' follow
  drivers/built-in.o: In function `dcon_wiggle_xo_1':
  olpc_dcon_xo_1.c:(.text+0x359708): undefined reference to `cs5535_gpio_set'
  drivers/built-in.o: In function `dcon_init_xo_1':
  olpc_dcon_xo_1.c:(.text+0x35989b): undefined reference to `cs5535_gpio_clear'
  olpc_dcon_xo_1.c:(.text+0x3598b5): undefined reference to `cs5535_gpio_isset'
  olpc_dcon_xo_1.c:(.text+0x359963): undefined reference to `cs5535_gpio_setup_event'
  olpc_dcon_xo_1.c:(.text+0x359980): undefined reference to `cs5535_gpio_set_irq'
  olpc_dcon_xo_1.c:(.text+0x359a36): undefined reference to `cs5535_gpio_set'

However, adding GPIO_CS5535 to the Kconfig dependencies also creates
a kconfig recursive dependency error on powerpc:
  drivers/i2c/Kconfig:5:error: recursive dependency detected!
  drivers/i2c/Kconfig:5:	symbol I2C is selected by FB_OLPC_DCON
  drivers/staging/olpc_dcon/Kconfig:1:	symbol FB_OLPC_DCON depends on GPIO_CS5535
  drivers/gpio/Kconfig:577:	symbol GPIO_CS5535 depends on GPIOLIB
  drivers/gpio/Kconfig:38:	symbol GPIOLIB is selected by ARCH_REQUIRE_GPIOLIB
  drivers/gpio/Kconfig:23:	symbol ARCH_REQUIRE_GPIOLIB is selected by MCU_MPC8349EMITX
  arch/powerpc/platforms/Kconfig:351:	symbol MCU_MPC8349EMITX depends on I2C

This is due to FB_OLPC_DCON selecting I2C instead of depending on it,
so change the select to a dependency.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc:	Daniel Drake <dsd@laptop.org>
Cc:	Jens Frederich <jfrederich@gmail.com>
Cc:	Jon Nettleton <jon.nettleton@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-15 12:25:30 -07:00
Greg Kroah-Hartman fcd70b4b08 Revert "staging/olpc: fix dependencies to fix build errors"
This reverts commit 6170155d4a.

It isn't correct.

Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Daniel Drake <dsd@laptop.org>
Cc: Jens Frederich <jfrederich@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-15 12:22:15 -07:00
Randy Dunlap 3685ebc4bd staging/mt29f_spinand: fix build error when ONDIEECC not enabled
Fix build error when CONFIG_MTD_SPINAND_ONDIEECC is not enabled
by moving an inline function outside of that #ifdef block.

drivers/staging/mt29f_spinand/mt29f_spinand.c: In function 'spinand_read_byte':
drivers/staging/mt29f_spinand/mt29f_spinand.c:665:9: error: implicit declaration of function 'mtd_to_state' [-Werror=implicit-function-declaration]
drivers/staging/mt29f_spinand/mt29f_spinand.c:665:32: warning: initialization makes pointer from integer without a cast [enabled by default]
drivers/staging/mt29f_spinand/mt29f_spinand.c: In function 'spinand_write_buf':
drivers/staging/mt29f_spinand/mt29f_spinand.c:700:32: warning: initialization makes pointer from integer without a cast [enabled by default]
drivers/staging/mt29f_spinand/mt29f_spinand.c: In function 'spinand_read_buf':
drivers/staging/mt29f_spinand/mt29f_spinand.c:707:32: warning: initialization makes pointer from integer without a cast [enabled by default]

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Kamlakant Patel <kamlakant.patel@broadcom.com>
Cc: Mona Anonuevo <manonuevo@micron.com>
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-15 12:19:48 -07:00
Lars-Peter Clausen e086ed7667 iio:buffer: Free active scan mask in iio_disable_all_buffers()
Usually the active scan mask is freed in __iio_update_buffers() when the buffer
is disabled. But when the device is still sampling when it is removed we'll end
up disabling the buffers in iio_disable_all_buffers(). So we also need to free
the active scan mask here, otherwise it will be leaked.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-15 19:26:43 +01:00
Lars-Peter Clausen cb6fbfa138 iio:kfifo: Set update_needed to false after allocating a new buffer
update_needed is used to decide whether the kfifo buffer needs to be
re-allocated. It is set to true whenever the size of the buffer is changed. It
is never set to false though, causing the buffer to always be re-allocated.
Setting update_needed to false after the new buffer has been allocated fixes the
problem.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-15 19:20:55 +01:00
Lars-Peter Clausen 5b78e5138e iio:kfifo: Empty buffer on update
The kfifo's request_update callback will free the current buffer and allocate a
new one if the size has changed. This will remove any samples that might still
be left in the buffer. If the size has not changed the buffer content is
left untouched though. This is a bit inconsistent and might cause an application
to see data from a previous capture. This patch inserts a call to
kfifo_reset_out() when the size did not change. This makes sure that any pending
samples are removed from the buffer.

Note, due to a different bug the buffer is currently always re-allocated, even
if the size did not change. So this patch will not change the behavior. In the
next patch the bug will be fixed and this patch makes sure that the current
behavior is kept.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-15 19:20:51 +01:00
Lars-Peter Clausen 0894d80dfd iio:kfifo: Protect against concurrent access from userspace
It is possible for userspace to concurrently access the buffer from multiple
threads or processes. To avoid corruption of the internal state of the buffer we
need to add proper locking. It is possible for multiple processes to try to read
from the buffer concurrently and it is also possible that one process causes a
buffer re-allocation while a different process still access the buffer. Both can
be fixed by protecting the calls to kfifo_to_user() and kfifo_alloc() by the
same mutex. In iio_read_first_n_kfifo() we also use kfifo_recsize() instead of
the buffers bytes_per_datum to avoid a race that can happen if bytes_per_datum
has been changed, but the buffer has not been reallocated yet.

Note that all access to the buffer from within the kernel is already properly
synchronized, so there is no need for extra locking in iio_store_to_kfifo().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-15 19:19:22 +01:00
Lars-Peter Clausen f6c23f4839 iio:kfifo: Fix memory leak
We need to free the kfifo when we release the buffer, otherwise the fifos memory
will be leaked.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-15 19:18:34 +01:00
Malcolm Priestley e1feda132f staging: vt6656: return if pControlURB->hcpriv not NULL
Fixes occasional urb submitted while active.

Even thought the fMP_CONTROL_WRITES/fMP_CONTROL_READS flags
are cleared in the return context urb->hcpriv is not NULL.

check for hcpriv and return STATUS_FAILURE if not NULL.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-15 09:42:13 -07:00
Malcolm Priestley 60cc27472c staging: vt6656: Remove 10 second timer and move to BSSvSecondCallBack
Remove sTimerTxData 10 second timer which triggers PSbSendNullPacket
every 40 seconds when bLinkPass == true.

Move the 40 second timer to the existing BSSvSecondCallBack
one second delayed workqueue and trigger every 40 seconds when
bLinkPass == true.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-15 09:42:12 -07:00
Malcolm Priestley 17f3ced05f staging: vt6656: return from workqueues on fMP_DISCONNECTED
Return from work queues on flag fMP_DISCONNECTED to prevent
any scheduling threads past closing of device.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-15 09:42:12 -07:00
Malcolm Priestley 759e9eba43 staging: vt6656: main_usb.c correct pDevice->pControlURB goto
Correct goto of patch
staging: vt6656: make pControlURB available life time of driver.

Which should free_netdev.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-15 09:42:12 -07:00
Greg Kroah-Hartman dc070641ee Revert "staging:media:lirc: quoted string split across lines"
This reverts commit 7db78438d9.

It broke the build, and isn't ok.

Cc: Archana kumari <archanakumari959@gmail.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-15 09:40:57 -07:00
Ashvini Varatharaj e7ed40fb26 Staging: vt6656: adding spaces around '='
Fix checkpatch error: ERROR: spaces required around that '=' (ctx:WxV)

Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-15 09:24:37 -07:00
Kelley Nielsen 1f13b0b8e7 staging: ft1000: remove formal get_request_value function header from ft1000-download.c
since there was no information in the C99 style header
for function get_request_type() that was not easily obtainable
by looking at the function, the header was completely removed.

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-15 08:50:33 -07:00
Kelley Nielsen c50ede7975 staging: ft1000: remove formal get_request_type function header from ft1000-download.c
since there was no information in the C99 style header
for function get_request_type() that was not easily obtainable
by looking at the function, the header was completely removed.

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-15 08:50:33 -07:00
Kelley Nielsen fafa4dcef4 staging: ft1000: convert formal put_handshake() header to single line comment
As per coding style,C99 comments are not allowed
also, the formal header contained empty space and
redundant information that's right there in the function

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-15 08:50:32 -07:00
Kelley Nielsen 89a03d3662 staging: ft1000: change ft1000-download.c header to /* */ comment style
Coding style requires that comments use the standard /* */ style
instead of C99 style.
Also removed author comment from a previous contributor

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-15 08:50:32 -07:00
Ashvini Varatharaj f222c70ccf Staging: rtl8192e: Replacing (u8*) with (u8 *)
Fix checkpatch error: ERROR: "(foo*)" should be "(foo *)"

Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-15 08:46:10 -07:00
Rashika Kheria 17cba02f9a Staging: btmtk_usb: Fix Sparse Warning of incorrect casting
This patch fixes the following Sparse Warnings in btmtk_usb.c:

drivers/staging/btmtk_usb/btmtk_usb.c:110:16: warning: cast to restricted __le32
drivers/staging/btmtk_usb/btmtk_usb.c:299:23: warning: cast to restricted __le16

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-15 08:41:08 -07:00
Marek Szyprowski 1931ee143b Revert "drivers: of: add initialization code for dma reserved memory"
This reverts commit 9d8eab7af7. There is
still no consensus on the bindings for the reserved memory and various
drawbacks of the proposed solution has been shown, so the best now is to
revert it completely and start again from scratch later.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Grant Likely <grant.likely@linaro.org>
2013-10-15 09:26:07 +01:00
Linus Torvalds 1e52db6908 vfio: Fix an incorrect break out of nested loop in iommu mapping code.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.15 (GNU/Linux)
 
 iQIcBAABAgAGBQJSXEKXAAoJECObm247sIsiMVgP/0P9+2UC2HS8pdCN4UnaC2RW
 zUdDwyEZ9T5uT1l9rseI7pjVSbdbXt6MW+UFPE8h6SqRdr6udzfLGFE8IuHOoKmk
 pVQfkaHAsQLY7O+bfXpGM0liyNDGXfDfyxE1HJtn79Ggnc3ek0tUFUaSNZgHDTYH
 O9QWG3g6mTb/NpHjFgHlGnyulUhDNdcnvOfczk8PWnSHRKHeAhEoFE1EEkfQGm4a
 X5SlYEBTmK/86FKptdC0Zaq2saIxdHR3lJVIn6S19rejXHqJ7zz8hZhYmJD9kg7P
 nq11zwWeC0S2Izvls9Xb6Akxom4w5uoz9oOgUbu7abTI2QIABe2SBVKibdqTgq9e
 FShxUNKLwW0Zh3DQ/5MNFpxrUJI7+NECy5QImfXKDhXDaDwBmE0JgFQ+o+UNB9vI
 TFptJVdoahVz2Wp6M/5hMyR4Ol0XCQQijYnsqWlsAsJQr98a7qQU4aUTt64CgAJ0
 eYPj0CqvP+1sV8x7n3xdK6C0eaHEJd7n68VlmnBzxzeBZHJ87PIR/3txy5AmYVXp
 3s9hr7g5zhMK+6U5DPlEUmeCKoh+53Ub5hbi0Cw7/3nI/NSnvKxQXKdBtN4B+TpT
 QpyA6bLTy0qVgd2rvntqOv8lgSVumC5BoaSVHMy90xxDS1UHEa0M96+RQkiE/QGX
 fB3a1NIrd8l6uv52lkui
 =M8E+
 -----END PGP SIGNATURE-----

Merge tag 'vfio-v3.12-rc5' of git://github.com/awilliam/linux-vfio

Pull vfio fix from Alex Williamson:
 "Fix an incorrect break out of nested loop in iommu mapping code"

* tag 'vfio-v3.12-rc5' of git://github.com/awilliam/linux-vfio:
  VFIO: vfio_iommu_type1: fix bug caused by break in nested loop
2013-10-14 18:11:28 -07:00
Linus Torvalds ed8ada3933 Last batch of IB changes for 3.12: many mlx5 hardware driver fixes plus
one trivial semicolon cleanup.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQIcBAABCAAGBQJSXCYCAAoJEENa44ZhAt0hWKgP/3R5GUceKeDn9R0ENGPSpQ1/
 dvsVmMccMGuJnyZSfUgoGb++6YY5rEjjj6epFlqXtkfoqUvNzDmw8nRO/Pkx+IAT
 e/FyrDpcpbuPyOQeGZLIAC2hoQRUPsmayfBOIN+mW8Qu3vUYTKjs12QRqDi3EP6m
 itJ07CfAX09LoiZ1S5QxSnEhPvR5MA7zy5ebgdk0QC+6tNcBWx7tOtCY7/BX4MnO
 zZL2ZVzxZbHIT7HY+gYID4QxGHFf7JvGX9ATLh9HUzOom3c1XLtdDhH/6mONsTTL
 BWTUJIa86DGJwY4fc6wDrOsC8DBo3o3YB98DUWUb6FQswQtx+PcyFg1dAhJuYFTQ
 Risjpty4y/EVfUTjBCirf2R8BLCKZyUIFL40ZJvgwhKsH569hS5sVTXMPrQNmsuY
 x7C17KJ1iabmtAswJCtM/aoeoodqZnAUg63aV+mbwQXQu9l06fx4UOo/TfG3tH1+
 FxVVD3ord98nh77Nv+sGB7ek7x0d3XxEaP7pZscDqRTUx7TT7dXXQY9GC5qAjnfr
 YhE8Exxmey+oZ3y6QTYI6scF5x8j0CJlSURfzDgOpKxYnSsdhgujGaQI++e9VF+W
 pHAWRqAGsf3wkoMJKZI6DC3lZka81yiByeROSmk08FSVNp7SkVNjl6VC8cAxkVfM
 nfNjy6fP/UQp/tcHp68R
 =0XuA
 -----END PGP SIGNATURE-----

Merge tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband

Pull infiniband updates from Roland Dreier:
 "Last batch of IB changes for 3.12: many mlx5 hardware driver fixes
  plus one trivial semicolon cleanup"

* tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  IB: Remove unnecessary semicolons
  IB/mlx5: Ensure proper synchronization accessing memory
  IB/mlx5: Fix alignment of reg umr gather buffers
  IB/mlx5: Fix eq names to display nicely in /proc/interrupts
  mlx5: Fix error code translation from firmware to driver
  IB/mlx5: Fix opt param mask according to firmware spec
  mlx5: Fix opt param mask for sq err to rts transition
  IB/mlx5: Disable atomic operations
  mlx5: Fix layout of struct mlx5_init_seg
  mlx5: Keep polling to reclaim pages while any returned
  IB/mlx5: Avoid async events on invalid port number
  IB/mlx5: Decrease memory consumption of mr caches
  mlx5: Remove checksum on command interface commands
  IB/mlx5: Fix memory leak in mlx5_ib_create_srq
  IB/mlx5: Flush cache workqueue before destroying it
  IB/mlx5: Fix send work queue size calculation
2013-10-14 17:43:33 -07:00
Lars-Peter Clausen ef4d4d1b8f staging:iio: Allow to build SoC specific drivers when COMPILE_TEST is set
None of the SPEAr, LPC32XX or MXS ADC drivers have a compile time dependency on
their respective platform. So make it possible to build the drivers when
CONFIG_COMPILE_TEST is set. This makes it easier to compile test changes.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Marek Vasut <marex@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Roland Stigge <stigge@antcom.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-14 23:09:47 +01:00
Lars-Peter Clausen 2cd1e1d8c1 staging:iio:mxs-lradc: Select STMP_DEVICE
The MXS ADC driver uses the stmp_reset_block() which is only provided when the
STMP_DEVICE Kconfig symbol is selected. Hence the driver should select this
symbol. So far this has not been a problem since the driver depends on ARCH_MXS,
which already selects STMP_DEVICE, but will become necessary once we allow the
driver to be built when COMPILE_TEST is selected.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-14 23:09:47 +01:00
Lars-Peter Clausen 8ecf5002f4 staging:iio:spear_adc: Fix sparse warning
The driver is casting from one __iomem pointer to another. Make sure to include
__iomem in the cast, otherwise sparse will complain with the following warning:

	drivers/staging/iio/adc/spear_adc.c:321:18: warning: cast removes address space of expression
	drivers/staging/iio/adc/spear_adc.c:320:33: warning: incorrect type in assignment (different address spaces)
	drivers/staging/iio/adc/spear_adc.c:320:33:    expected struct adc_regs_spear3xx [noderef] <asn:2>*adc_base_spear3xx
	drivers/staging/iio/adc/spear_adc.c:320:33:    got struct adc_regs_spear3xx *<noident>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-14 23:09:47 +01:00
Greg Kroah-Hartman 43e699cebe Revert "usb: musb: gadget: fix otg active status flag"
This reverts commit 9b0a1de3c8.

Aaro writes:
	With v3.12-rc4 I can no longer connect to N800 (OMAP2) with USB
	(peripheral, g_ether).

	According to git bisect this is caused by:

	9b0a1de3c8 is the first bad commit

So revert this patch, as Felipe says:
	It's unfortunate that tusb6010 is so messed up

Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Acked-by: Felipe Balbi <balbi@ti.com>
Cc: Bin Liu <b-liu@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14 13:06:15 -07:00
Oliver Neukum 4294bca7b4 USB: quirks.c: add one device that cannot deal with suspension
The device is not responsive when resumed, unless it is reset.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
CC: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14 11:17:31 -07:00
Jovi Zhangwei 2c856b9e3e staging: ktap: remove unused <asm/syscall.h> header file
Fengguang Wu reported that ktap compile failed in mips,
the reason is it cannot found <asm/syscall.h> in mips arch.

Due to the code serviced by <asm/syscall.h> already removed,
so just simply remove the according header file to avoid
compiler failure.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Jovi Zhangwei <jovi.zhangwei@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14 10:36:09 -07:00
Roland Dreier 59b5b28d1a Merge branch 'misc' into for-next 2013-10-14 10:10:46 -07:00
Joe Perches 2b50176d11 IB: Remove unnecessary semicolons
These aren't necessary after switch blocks.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
2013-10-14 10:10:00 -07:00
Joe Perches ec83e611c2 staging: lustre: Use parenthesis around sizeof
Convert sizeof foo to sizeof(foo) to be more kernel style compatible.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14 09:34:15 -07:00
Larry Finger 691dd0b7d2 staging: r8188eu: Convert driver to use external firmware
As originally submitted, this driver acquired its firmware from data
statements embedded in the source code. This information has been extracted
into a binary file that has been accepted into the linux-firmware git
repo as commit ffc47f1 entitled "rtlwifi: Add new firmware files for
rtl8188eu". This patch switches the driver to use this file, and deletes
the firmware data from the source. The TODO list is also updated.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14 09:34:15 -07:00
Linus Torvalds 35f9162d67 ACPI and power management fixes for 3.12-rc5
- The WARN_ON() in acpiphp_enumerate_slots() triggers as a false
    positive in some cases, so drop it.
 
  - Add a missing pci_dev_put() to an error code path in
    acpiphp_enumerate_slots().
 
  - Replace my old e-mail address that's going to expire with a new one.
 
  - Update ACPI web links and git tree information in MAINTAINERS.
 
  - Update links to the Linux-ACPI project's page in MAINTAINERS.
 
  - Update some stale links and e-mail addresses under Documentation
    and in the ACPI Kconfig file.
 
 /
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQIcBAABCAAGBQJSWbjDAAoJEILEb/54YlRxcwwP/A/L/7DytAJXVrZTomnI2zu2
 nvi/q6uc77jXVGluL0ZsxO8QcZLv2RDVQ5y4J7sLkvl1xtWeJzX5uXa6+zmpyjva
 TGtswYh5651oWbatk0OQ22QHxZg92Gvv4Ec9ThyjvFrNq08f1Xm+T2KWQfKG85X9
 9pHw6w4oLIf8G3CqQQGGuP0eNXnKr8GjytV6jQ6wzECfj2WhivZQiI3bP7fRBSNY
 GFcMt9Uf8/wOoAW8XTZXbsbXhDEUsTRgGwpb+zXXO6ODtaSfi7Y/Viq1ddqGe4FG
 ETqJLCA3nsHwNdjTBVC+As6x99REahOCKpjpmtqnZuHyDi8eWsqwitFJo8QX2AeR
 R6Q+3fXSeiV7lKd6Dj7ovvp2j7nxKkiJvn8bVIgo0fC3DKOYGtMjYvWiIQEjdQTG
 7DlJ8/eV3sC5FF92f/yxVYWSZgOqWzYb8JU4ALa5858YBNzMcroTQow1SOs6oiyM
 p9NXoF3tVnWmdiUCQlcQEiAK64OkuQCffvbL4feWTEJeSf1iQ5MFg/vnv6BRIH36
 LotRo0MWO8z1kJ+yuI7DrV+hT+UwY3OTlhZC3v8HTxrgaCOcHs+BYhliSe9NjMVu
 7VQ4ELQ9+/q+3TEcB8B3Dh42eHfnaIezx3utOEPdrHFvVD3HyP3gBmTb/BRqM5ZR
 wMHcmPn5Kx839oFKYRno
 =nNGo
 -----END PGP SIGNATURE-----

Merge tag 'pm+acpi-3.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI and power management fixes from Rafael Wysocki:
 "These fix two recent bugs in ACPIPHP (ACPI-based PCI hotplug) and
  update a bunch of web links and e-mail addresses in MAINTAINERS, docs
  and Kconfig that either are stale or will expire soon.

  Specifics:

   - The WARN_ON() in acpiphp_enumerate_slots() triggers as a false
     positive in some cases, so drop it.

   - Add a missing pci_dev_put() to an error code path in
     acpiphp_enumerate_slots().

   - Replace my old e-mail address that's going to expire with a new
     one.

   - Update ACPI web links and git tree information in MAINTAINERS.

   - Update links to the Linux-ACPI project's page in MAINTAINERS.

   - Update some stale links and e-mail addresses under Documentation
     and in the ACPI Kconfig file"

* tag 'pm+acpi-3.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI / hotplug / PCI: Drop WARN_ON() from acpiphp_enumerate_slots()
  ACPI / hotplug / PCI: Fix error code path in acpiphp_enumerate_slots()
  ACPI / PM / Documentation: Replace outdated project links and addresses
  MAINTAINERS / ACPI: Update links to the Linux-ACPI project web page
  MAINTAINERS / ACPI: Update links and git tree information
  MAINTAINERS / Documentation: Update Rafael's e-mail address
2013-10-14 09:31:08 -07:00
Nandini Hanumanthagowda 851ec8cda8 staging: octeon: Removed space at start of line
Removed unnecessary space at start of line
to fix checkpatch.pl warning.

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14 09:30:35 -07:00
Nandini Hanumanthagowda b186410d6a staging: octeon: Fixed line over 80 chars warning
Fixed the line over 80 characters warning
to comply with linux cidung style

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14 09:30:35 -07:00
Ashvini Varatharaj a6df8a4f14 Staging: cxt1e1: remove space between function name and '('
Fix checkpatch warning: WARNING: space prohibited between function name
and open parenthesis '('

Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14 09:27:14 -07:00
Ashvini Varatharaj 6c762a4298 Staging: cxt1e1: moving { to the previous line
Fix checkpatch error: ERROR: that open brace { should be on the previous
line

Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14 09:27:14 -07:00
Kelley Nielsen 135a9ea056 staging: ft1000: convert formal get_handshake() function header to single line comment
As per coding style,C99 comments are not allowed
also, the formal header contained empty space and
redundant information that's right there in the function

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14 09:24:49 -07:00
Kelley Nielsen de7a0cc15a staging: ft1000: convert formal function header to single line comment
As per coding style,C99 comments are not allowed
also, the formal header contained empty space and
redundant information that's right there in the function

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14 09:24:49 -07:00
Kelley Nielsen 6f5519fd83 staging: ft1000: remove space before closing paren
as per coding style,
space prohibited before that close parenthesis

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14 09:23:23 -07:00
Kelley Nielsen 610554d3ac staging: ft1000: remove space before address operator
as per coding style (checkpatch error),
space prohibited after that '&'

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14 09:23:23 -07:00
Kelley Nielsen cfd9d1fad6 staging: ft1000: remove braces from one-line conditional
As per coding style,
braces {} are not necessary for single statement blocks

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14 09:23:22 -07:00
Kelley Nielsen 0c5e802c1c staging: ft1000: change comment style
Coding style requires that comments use the standard /* */ style
instead of C99 style.

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14 09:19:59 -07:00
Nandini Hanumanthagowda 1f2a55f23f staging: speakup: remove unnecessary space before semicolon
Removed unnecessary space before semicolon which was
leading to checkpatch.pl warning.

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14 09:15:27 -07:00
Ashvini Varatharaj 1d2a01eb40 Staging: xgifb: remove space before semicolon
Fix checkpatch warning: WARNING:space prohibited before semicolon

Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14 09:15:27 -07:00
Kelley Nielsen e072241a31 staging: ft1000-usb: remove space between function name and open paren in ft1000_download.c
fixed checkpatch.pl warning: space prohibited between function name and
open parenthesis '('

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14 09:15:26 -07:00
Nandini Hanumanthagowda c6e9a0565f staging: vt6655: Removed C99 style comments
C99 style comment // should not be used as
per coding guidelines.Usage of C99 style
comment // was resulting in checkpatch.pl
error.Hence replaced it with block comment /* */

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14 09:15:26 -07:00
Nandini Hanumanthagowda f19454f877 staging: vt6656: Removed redundant code from iwctl file
There was one line which was added twice in the
definition of iwctl_handler and hence was redundant.
It was defined at line nos 1798 and 1818. Removed
the code at line 1818.
The redundant code was:
IW_HANDLER(SIOCSIWMLME, iwctl_siwmlme)
which was defined twice.

Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14 09:15:26 -07:00
Grant Likely b920ecc826 Revert "of: Feed entire flattened device tree into the random pool"
This reverts commit 109b623629.

Tim Bird expressed concern that this will have a bad effect on boot
time, and while simple tests have shown it to be okay with simple tree,
a device tree blob can potentially be quite large and
add_device_randomness() is not a fast function. Rather than do this for
all platforms unconditionally, I'm reverting this patch and would like
to see it revisited. Instead of feeding the entire tree into the random
pool, it would probably be appropriate to hash the tree and feed the
hash result into the pool. There really isn't a lot of randomness in a
device tree anyway. In the majority of cases only a handful of
properties are going to be different between machines with the same
baseboard.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2013-10-14 12:46:04 +01:00
Grant Likely 444c91e572 of: fix unnecessary warning on missing /cpus node
Not all DT platforms have all the cpus collected under a /cpus node.
That just happens to be a details of FDT, ePAPR and PowerPC platforms.
Sparc does something different, but unfortunately the current code
complains with a warning if /cpus isn't there. This became a problem
with commit f86e4718, "driver/core cpu: initialize of_node in cpu's
device structure", which caused the function to get called for all
architectures.

This commit is a temporary fix to fail silently if the cpus node isn't
present. A proper fix will come later to allow arch code to provide a
custom mechanism for decoding the CPU hwid if the 'reg' property isn't
appropriate.

Signed-off-by: Grant Likely <grant.likely@linaro.org>
Cc: David Miller <davem@davemloft.net>
Cc: Sudeep KarkadaNagesha <Sudeep.KarkadaNagesha@arm.com>
Cc: Rob Herring <rob.herring@calxeda.com>
2013-10-14 12:43:44 +01:00
Linus Torvalds 73cac03d0c Merge git://www.linux-watchdog.org/linux-watchdog
Pull watchdog fixes from Wim Van Sebroeck:
 "This will fix a deadlock on the ts72xx_wdt driver, fix bitmasks in the
  kempld_wdt driver and fix a section mismatch in the sunxi_wdt driver"

* git://www.linux-watchdog.org/linux-watchdog:
  watchdog: sunxi: Fix section mismatch
  watchdog: kempld_wdt: Fix bit mask definition
  watchdog: ts72xx_wdt: locking bug in ioctl
2013-10-13 11:41:26 -07:00
Maxime Ripard 1d5898b4f8 watchdog: sunxi: Fix section mismatch
This driver has a section mismatch, for probe and remove functions,
leading to the following warning during the compilation.

WARNING: drivers/watchdog/built-in.o(.data+0x24): Section mismatch in
reference from the variable sunxi_wdt_driver to the function
.init.text:sunxi_wdt_probe()
The variable sunxi_wdt_driver references
the function __init sunxi_wdt_probe()

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2013-10-13 20:02:03 +02:00
Jingoo Han 4c4e45669d watchdog: kempld_wdt: Fix bit mask definition
STAGE_CFG bits are defined as [5:4] bits. However, '(((x) & 0x30) << 4)'
handles [9:8] bits. Thus, it should be fixed in order to handle
[5:4] bits.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2013-10-13 20:01:57 +02:00
Dan Carpenter 8612ed0d97 watchdog: ts72xx_wdt: locking bug in ioctl
Calling the WDIOC_GETSTATUS & WDIOC_GETBOOTSTATUS and twice will cause a
interruptible deadlock.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2013-10-13 20:01:50 +02:00
Linus Torvalds 75c531881b Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma
Pull slave-dmaengine fixes from Vinod Koul:
 "Another week, time to send another fixes request taking time out of
  extended weekend for the festivities in this part of the world.

  We have two fixes from Sergei for rcar driver and one fixing memory
  leak of edma driver by Geyslan"

* 'fixes' of git://git.infradead.org/users/vkoul/slave-dma:
  dma: edma.c: remove edma_desc leakage
  rcar-hpbdma: add parameter to set_slave() method
  rcar-hpbdma: remove shdma_free_irq() calls
2013-10-13 09:02:03 -07:00
Linus Torvalds 6cc3026e47 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c fixes from Wolfram Sang:
 "We had various reports of problems with deferred probing in the I2C
  subsystem, so this pull requst is a little bigger than usual.

  Most issues should be addressed now so devices will be found
  correctly.  A few ususal driver bugfixes are in here, too"

* 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: i2c-mux-pinctrl: use deferred probe when adapter not found
  i2c: i2c-arb-gpio-challenge: use deferred probe when adapter not found
  i2c: i2c-mux-gpio: use deferred probing
  i2c: i2c-mux-gpio: don't ignore of_get_named_gpio errors
  i2c: omap: Clear ARDY bit twice
  i2c: Not all adapters have a parent
  i2c: i2c-stu300: replace platform_driver_probe to support deferred probing
  i2c: i2c-mxs: replace platform_driver_probe to support deferred probing
  i2c: i2c-imx: replace platform_driver_probe to support deferred probing
  i2c: i2c-designware-platdrv: replace platform_driver_probe to support deferred probing
2013-10-12 11:52:40 -07:00
Linus Torvalds 71ac3d1938 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Ingo Molnar:
 "A build fix and a reboot quirk"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/reboot: Add reboot quirk for Dell Latitude E5410
  x86, build, pci: Fix PCI_MSI build on !SMP
2013-10-12 10:36:03 -07:00
Rafael J. Wysocki 2c5bfce855 Merge branch 'acpi-pci-hotplug'
* acpi-pci-hotplug:
  ACPI / hotplug / PCI: Drop WARN_ON() from acpiphp_enumerate_slots()
  ACPI / hotplug / PCI: Fix error code path in acpiphp_enumerate_slots()
2013-10-12 15:19:52 +02:00
Lars-Peter Clausen d406fd9d9a staging:iio:spear_adc: Remove unused variable
Remove the scale_mv variable from the read_raw() callback. Fixes the following
warning:
	drivers/staging/iio/adc/spear_adc.c: In function 'spear_read_raw':
	drivers/staging/iio/adc/spear_adc.c:149:6: warning: unused variable 'scale_mv'

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 13:23:55 +01:00
Wei Yongjun 00bfacfeb4 iio: frequency: adf4350: add missing clk_disable_unprepare() on error in adf4350_probe()
Add the missing clk_disable_unprepare() before return
from adf4350_probe() in the error handling case.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Reviewed-by: Lars-Peter CLausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 13:20:46 +01:00
Lars-Peter Clausen 3909fab5a8 iio:buffer: Ignore noop requests for iio_update_buffers()
Since the kernel now disables all buffers when a device is unregistered it might
happen that a in-kernel consumer tries to disable that buffer again. So ignore
requests where the buffer already is in the desired state.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 13:06:31 +01:00
Lars-Peter Clausen ec87197fb8 staging:iio:ad7291: Use event spec for threshold hysteresis
Register the event threshold hysteresis attributes by using the new
IIO_EV_INFO_HYSTERESIS event spec type. This allows us to throw away a good
portion of boiler-plate code.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 13:04:22 +01:00
Lars-Peter Clausen ba1d79613d staging:iio:ad799x: Use event spec for threshold hysteresis
Register the event threshold hysteresis attributes by using the new
IIO_EV_INFO_HYSTERESIS event spec type. This allows us to throw away a good
portion of boiler-plate code.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 13:02:19 +01:00
Lars-Peter Clausen 69582b8884 staging:iio:ad799x: Simplify threshold register look-up
Given a channel number the corresponding threshold and hysteresis registers can
easily be calculated. No need to use a look-up table.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 12:52:33 +01:00
Lars-Peter Clausen ec6670ae53 iio: Add a hysteresis event info attribute
For some devices it is possible to configure a hysteresis for threshold (or
similar) events. This patch adds a new hysteresis event info type which allows
for easy creation and read/write handling of the sysfs attribute.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 12:51:35 +01:00
Lars-Peter Clausen 3ea48e0124 staging:iio:tsl2x7x: Switch to new event config interface
Switch the tsl2x7x driver to the new IIO event config interface as the old one
is going to be removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Jon Brenner <jbrenner@taosinc.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 12:50:26 +01:00
Lars-Peter Clausen bda624b088 staging:iio:simple_dummy: Switch to new event config interface
Switch the simple_dummy driver to the new IIO event config interface as the old
one is going to be removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 12:48:39 +01:00
Lars-Peter Clausen 1489d629a4 staging:iio:ad7150: Switch to new event config interface
Switch the ad7150 driver to the new IIO event config interface as the old one
is going to be removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 12:47:41 +01:00
Lars-Peter Clausen 5b9e048a80 staging:iio:ad799x: Switch to new event config interface
Switch the ad799x driver to the new IIO event config interface as the old one
is going to be removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 12:47:02 +01:00
Lars-Peter Clausen b80a674b8d staging:iio:ad7291: Switch to new event config interface
Switch the ad7291 driver to the new IIO event config interface as the old one
is going to be removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 12:46:31 +01:00
Lars-Peter Clausen 129c3f611a staging:iio:sca3000: Switch to new config interface
Switch the sca3000 driver to the new IIO event config interface as the old one
is going to be removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 12:46:02 +01:00
Lars-Peter Clausen 693101ddba staging:iio:lis2l02dq: Share threshold value between axis
The threshold event can be enabled/disabled separately, but the threshold value
is shared between all three axis.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 12:45:44 +01:00
Lars-Peter Clausen 8613e92cc3 staging:iio:lis3l02dq: Switch to new event config interface
Switch the lis3l02dq driver to the new IIO event config interface as the old one
is going to be removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 12:42:39 +01:00
Lars-Peter Clausen 7e97e7bd1f iio:apds9300: Use new event config interface
Switch the apds9300 driver to the new IIO event config interface as the old one
is going to be removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Oleksandr Kravchenko <o.v.kravchenko@globallogic.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 12:41:07 +01:00
Lars-Peter Clausen 6d59747eb0 iio:tsl2563: Switch to new event config interface
Switch the tsl2563 driver to the new IIO event config interface as the old one
is going to be removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 12:39:27 +01:00
Lars-Peter Clausen 5d6a25bad0 iio:gp2ap020a00f: Switch to new event config interface
Switch the gp2ap020a00f driver to the new IIO event config interface as the old
one is going to be removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 12:36:43 +01:00
Lars-Peter Clausen 1eefd62b63 iio:ad5421: Switch to new event config interface
Switch the ad5421 driver to the new IIO event config interface as the old one
is going to be removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 12:35:05 +01:00
Lars-Peter Clausen e4ec84f83d iio:max1363: Switch to new event config interface
Switch the max1363 driver to the new IIO event config interface as the old one
is going to be removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 12:33:59 +01:00
Lars-Peter Clausen b4e3ac0a20 iio: Extend the event config interface
The event configuration interface of the IIO framework has not been getting the
same attention as other parts. As a result it has not seen the same improvements
as e.g. the channel interface has seen with the introduction of the channel spec
struct. Currently all the event config callbacks take a u64 (the so called event
code) to pass all the different information about for which event the callback
is invoked. The callback function then has to extract the information it is
interested in using some macros with rather long names. Most information encoded
in the event code comes straight from the iio_chan_spec struct the event was
registered for. Since we always have a handle to the channel spec when we call
the event callbacks the first step is to add the channel spec as a parameter to
the event callbacks. The two remaining things encoded in the event code are the
type and direction of the event. Instead of passing them in one parameter, add
one parameter for each of them and remove the eventcode from the event
callbacks. The patch also adds a new iio_event_info parameter to the
{read,write}_event_value callbacks. This makes it possible, similar to the
iio_chan_info_enum for channels, to specify additional properties other than
just the value for an event. Furthermore the new interface will allow to
register shared events. This is e.g. useful if a device allows configuring a
threshold event, but the threshold setting is the same for all channels.

To implement this the patch adds a new iio_event_spec struct which is similar to
the iio_chan_spec struct. It as two field to specify the type and the direction
of the event. Furthermore it has a mask field for each one of the different
iio_shared_by types. These mask fields holds which kind of attributes should be
registered for the event. Creation of the attributes follows the same rules as
the for the channel attributes. E.g. for the separate_mask there will be a
attribute for each channel with this event, for the shared_by_type there will
only be one attribute per channel type. The iio_chan_spec struct gets two new
fields, 'event_spec' and 'num_event_specs', which is used to specify which the
events for this channel. These two fields are going to replace the channel's
event_mask field.

For now both the old and the new event config interface coexist, but over the
few patches all drivers will be converted from the old to the new interface.
Once that is done all code for supporting the old interface will be removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 12:32:19 +01:00
Lars-Peter Clausen 3661f3f5e9 iio: Factor IIO value formating into its own function
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 12:23:33 +01:00
Sebastian Andrzej Siewior 11cb454f09 staging: iio: generic_buffer: initialize ret
The `ret´ variable is only initialized in the error case. For some reason
it was always != 0 while I played with generic_buffer so here is a patch.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 12:19:50 +01:00
Lars-Peter Clausen 84088ebd14 iio: Add a helper to free a list of IIO device attributes
We have the same code to free a IIO device attribute list in multiple place.
This patch adds a new helper function to take care of this and replaces the
custom instances with a call to the helper function. Note that we do not need to
call list_del() for each of the list items since we will never look at any of
the list items nor the list itself again.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 12:17:34 +01:00
Lars-Peter Clausen a95194569f iio:buffer: Add proper locking for iio_update_buffers()
We need to make sure that in-kernel users of iio_update_buffers() do not race
against each other or against unregistration of the device. So we need to take
both the mlock and the info_exist_lock when calling iio_update_buffers() from a
in-kernel consumer.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 12:07:11 +01:00
Lars-Peter Clausen d2f0a48f36 iio: Wakeup poll and blocking reads when the device is unregistered
Once the device has been unregistered there won't be any new data no matter how
long a userspace application waits, so we might as well wake them up and let
them know.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 12:05:36 +01:00
Lars-Peter Clausen f18e7a068a iio: Return -ENODEV for file operations if the device has been unregistered
If the IIO device has been unregistered return -ENODEV for any further file
operations like read() and ioctl(). This avoids userspace being able to grab new
references to the device.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 12:04:17 +01:00
Lars-Peter Clausen 9e69c935fa iio: Add reference counting for buffers
Since the buffer is accessed by userspace we can not just free the buffers
memory once we are done with it in kernel space. There might still be open file
descriptors and userspace still might be accessing the buffer. This patch adds
support for reference counting to the IIO buffers. When a buffer is created and
initialized its initial reference count is set to 1. Instead of freeing the
memory of the buffer the buffer's _free() function will drop that reference
again. But only after the last reference to the buffer has been dropped the
buffer the buffer's memory will be freed. The IIO device will take a reference
to its primary buffer. The patch adds a small helper function for this called
iio_device_attach_buffer() which will get a reference to the buffer and assign
the buffer to the IIO device. This function must be used instead of assigning
the buffer to the device by hand. The reference is only dropped once the IIO
device is freed and we can be sure that there are no more open file handles. A
reference to a buffer will also be taken whenever the buffer is active to avoid
the buffer being freed while data is still being send to it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-12 12:04:01 +01:00
Rafael J. Wysocki fd3cfebec3 ACPI / hotplug / PCI: Drop WARN_ON() from acpiphp_enumerate_slots()
The WARN_ON() in acpiphp_enumerate_slots() triggers unnecessarily for
devices whose bridges are going to be handled by native PCIe hotplug
(pciehp) and the simplest way to prevent that from happening is to
drop the WARN_ON().

References: https://bugzilla.kernel.org/show_bug.cgi?id=62831
Reported-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-12 01:49:48 +02:00
Rafael J. Wysocki 5d4494573c ACPI / hotplug / PCI: Fix error code path in acpiphp_enumerate_slots()
One of the error code paths in acpiphp_enumerate_slots() is missing
a pci_dev_put(bridge->pci_dev) call, so add it.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
2013-10-12 01:47:43 +02:00
Greg Kroah-Hartman f4c19b8e16 USB: serial: option: add support for Inovia SEW858 device
This patch adds the device id for the Inovia SEW858 device to the option driver.

Reported-by: Pavel Parkhomenko <ra85551@gmail.com>
Tested-by: Pavel Parkhomenko <ra85551@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 16:17:51 -07:00
Diego Elio Pettenò c9d09dc7ad USB: serial: ti_usb_3410_5052: add Abbott strip port ID to combined table as well.
Without this change, the USB cable for Freestyle Option and compatible
glucometers will not be detected by the driver.

Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 16:17:51 -07:00
Fangxiaozhi (Franko) d544db293a USB: support new huawei devices in option.c
Add new supporting declarations to option.c, to support Huawei new
devices with new bInterfaceSubClass value.

Signed-off-by: fangxiaozhi <huananhu@huawei.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 16:17:51 -07:00
Greg Kroah-Hartman 625816a430 xhci: Bug fixes and quirks for 3.12
Hi Greg,
 
 Here's four patches for 3.12.
 
 The first patch is a bug fix for the USB 2.0 Link PM registers that I sent
 out to the list a long time ago (August), but forgot to queue up.  The
 second and fourth patches are quirks for xHCI hosts.  These patches are
 marked for stable.  The third patch fixes a bug uncovered with sparse.
 
 Sarah Sharp
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJSVedBAAoJEBMGWMLi1Gc56NwP/RHNqTr08qcYdGFANtXXzJz7
 ztZaHePXgd/G1Xx0NihjEsqakbY30RmXBqvqdaEYI2nl6B0LnbKe8n3ihBqnwyHp
 N3v9d9zA3uUZwN9vep3/wL7aulwhE2kldyfaofo4cVCbICtP88YLdjdpWtRl/Jxs
 bqu9tO3QCwokZfOQgZTnWUMUVtz1bt2EV3eXJNh+2SZVqLwr4FxUfqkW6OZ+6Dmr
 6Lu7crD8AAygKEqOeGJHZTkfZ3vX8P0Ne9p+YQqrdSRV+D9As7kppcRwr5Ehh3hI
 pkSiu1rx7FBBp94pLy/573R9KOdzBcUB/B0mP5nbBGytCNRtP7dOS+dMN1kZr/7+
 BbXY5p9BEdTNJJKy72P+4MngdLj6EtLewBXyYIIzdD6Yem/OZrrp6h7huakdsCrT
 fbYscLy2fP1HVjfJ9adnV77DAWOUsOFNId68YbQoAGjSRRulKMPP7piMDBKqfCPW
 HyOgjeTk+E2M38xhJm2fTYXc0uhC/dH/xMObHWxC0OGZ3g8miQm6uoeSAsWTQpfS
 UOPJFcd7pkYOIs9KWtmOwKVIeozkicScrl58JoLzsUVenDrXhfmQN1rbh2wSAl/0
 JDT8qIlMwG9BTDyQJBXQCbK/3Z4JLv5IcmZiGzI1b3UI7pP8J7R7mmtqHzduDVFS
 WqJOSyZM9xEk2WYFFtzx
 =4Y1d
 -----END PGP SIGNATURE-----

Merge tag 'for-usb-linus-2013-10-09' of git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-linus

Pull xhci USB fixes from Sarah:

xhci: Bug fixes and quirks for 3.12

Hi Greg,

Here's four patches for 3.12.

The first patch is a bug fix for the USB 2.0 Link PM registers that I sent
out to the list a long time ago (August), but forgot to queue up.  The
second and fourth patches are quirks for xHCI hosts.  These patches are
marked for stable.  The third patch fixes a bug uncovered with sparse.

Sarah Sharp
2013-10-11 16:14:45 -07:00
Greg Kroah-Hartman 22c7ef0a51 usb: musb: fix for v3.12-rc
A single patch fixing musb start when using peripheral
 only configurations. It turns out that musb_start() needs
 to be called for peripheral too, so that function is
 factored out of musb_virthub.c and into musb_core.c since
 it's shared for both roles.
 
 Signed-of-by: Felipe Balbi <balbi@ti.com>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJSWCGDAAoJEIaOsuA1yqREoF0P/2koIltWmxgHftathRpbJ0M1
 aqqTFtKzeDlAMIJASM5f38KsbN1QAqVG57GtDl+CYqeK0M2wzw345E5JAoY0dD1n
 /QWAUcy2pKLf54wRHtP3hFv1/EyxniY6cgHkD4eh/BPMa+4AsepqNR8qxbN4WRCA
 Xs7iLFHIxfdIGJUJfegL3isaav9KGCVg5JpqykVbxi86A70a4R/Ogm2EcIciRKDT
 GWEIx6DDgsfr1A5QWKXKZFwlxnZE0BOje/lHV3KjAETboA4f5fynDXDbaayvjO7n
 DmobSOAZsN1M/GsQB4Kh6sMvd1CAOH4T4gbO7pGiQG58NObv/nRgkaowVI0RzSwH
 HREE1ODfHnXk1ArPxwKwcyIdOHa8VhNWfLa2pI1RdRjMWFwbn4AojA45fxFjBr9S
 Ht9lqdTpe8bmcV7iUp+x81ZOe7cEtfkgNh3Z2fpTF+4dGUO47aSMBx3zcEszH+gH
 iHAS+Uv4gH+jqxc8g5cM+haC1w4ulX+Rj0ZN6xKQ0612lLMeKctVk8XmW/ZM7urF
 /6RDmlzHrv1a34aW3k+LaPwR1oWsxy2zHSw2D5I1Vd20CZghHp+JprxGpAOjw4fS
 D3euh+TeYULPx68skf7GRRPzD74bvf9hobvmaSXsTlVh+5wfqoIwrNNd2K5j8/5+
 2Yck609ZK232R7obgfPv
 =wdwW
 -----END PGP SIGNATURE-----

Merge tag 'fixes-for-v3.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus

Pull USB gadget fixes from Felipe:

usb: musb: fix for v3.12-rc

A single patch fixing musb start when using peripheral
only configurations. It turns out that musb_start() needs
to be called for peripheral too, so that function is
factored out of musb_virthub.c and into musb_core.c since
it's shared for both roles.

Signed-of-by: Felipe Balbi <balbi@ti.com>
2013-10-11 16:10:56 -07:00
Joe Perches a22526e48d staging: Remove unnecessary semicolons
These aren't necessary after switch, if and while statements.

Also remove some unnecessary braces where these
semicolons were removed around single statement
and some unnecessary blank lines.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:47:06 -07:00
Wei Yongjun a7d7b01631 Staging: crystalhd: use vfree() instead of kfree()
Use vfree() instead of kfree() to free vmalloc()
allocated data.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:47:06 -07:00
Aaro Koskinen 5669601d92 staging: octeon-usb: use list.h for transactions
Use list.h helpers for transactions.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:46:00 -07:00
Aaro Koskinen 4a23ee1bd7 staging: octeon-usb: use list.h for pipes
Use list.h helpers for pipes.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:46:00 -07:00
Aaro Koskinen f011fefa8a staging: octeon-usb: use list_for_each_entry_safe()
Use list_for_each_entry_safe() when deleting all list items.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:46:00 -07:00
Aaro Koskinen 244544a185 staging: octeon-usb: use list_del_init()
Replace list_del() + INIT_LIST_HEAD() with list_del_init().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:45:59 -07:00
Aaro Koskinen d2695a8a3d staging: octeon-usb: use dynamic allocation for pipes
Use dynamic memory allocation for pipes.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:45:59 -07:00
Aaro Koskinen a2dfef06e6 staging: octeon-usb: use dynamic allocation for transactions
Use dynamic memory allocation for transactions.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:45:59 -07:00
Aaro Koskinen f121910396 staging: octeon-usb: use a single .h file
Merge USBC and USBN register definitions into a single header
file. Although all HW definitions are purely internal to the driver,
it's better to keep them separate due to the large size of the file.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:45:59 -07:00
Aaro Koskinen 7d7bc26b1d staging: octeon-usb: CN3xxx: program p_xenbn and p_rclk through p_rtype
Do the clock setup through p_rtype on all OCTEONs. This enables to get
rid of duplicated register definitions.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:45:59 -07:00
Aaro Koskinen 34b70b9e05 staging: octeon-usb: delete cvmx_usbnx_clk_ctl_cn50xx
Add the missing bits to common clk ctl definition, and we can delete
duplicated definitions.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:45:59 -07:00
Aaro Koskinen d8d8e148fd staging: octeon-usb: delete unused cvmx_usbnx_usbp_ctl_status definitions
cvmx_usbnx_usbp_ctl_status was multiplied for different OCTEONS and all
those definitions are unused. Delete them.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:45:58 -07:00
Xenia Ragiadakou 9f627100b9 staging: rtl8192u: copy dot11d.h in ieee80211/dot11d.h and remove it
This patch copies the content of dot11d.h into ieee80211/dot11d.h and then
removes it because practically the two header files are the same with the
difference that in dot11d.h some checkpatch warnings have been corrected.
This is done because the duplication of dot11d.h is unnecessary since the
structures and functions that defines are used directly only inside ieee80211/.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:44:23 -07:00
Xenia Ragiadakou 8fa9cf5d8a staging: rtl8192u: remove ieee80211_crypt.h
This patch removes ieee80211_crypt.h because this header file is the same as
ieee80211/ieee80211_crypt.h and the structures and functions declared in it
are used directly only inside ieee80211/.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:44:23 -07:00
Xenia Ragiadakou deba326bfd staging: rtl8192u: remove r8180_pm.c and r8180_pm.h
This patch removes r8180_pm.h and r8180_pm.c from rtl8192u because they
are not used anywhere in the driver.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:44:23 -07:00
Xenia Ragiadakou 1bafe45f9b staging: rtl8192u: fix line size in r819xU_HTType.h
This patch fixes the following checkpatch warning in r819xU_HTType.h:
WARNING: line over 80 characters

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:55 -07:00
Xenia Ragiadakou b812fd3b57 staging: rtl8192u: add parenthesis around complex macros in r819xU_HTType.h
This patch fixes the following checkpatch error:
ERROR: Macros with complex values should be enclosed in parenthesis

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:55 -07:00
Xenia Ragiadakou b3052681e8 staging: rtl8192u: add space after ',' in r819xU_HTType.h
This patch fixes the following checkpatch error:
ERROR: space required after that ','

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:54 -07:00
Xenia Ragiadakou 1f7750343d staging: rtl8192u: fix alignment in r819xU_HTType.h
This patch fixes some alignment issues in r819xU_HTType.h to impreove code
readability.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:54 -07:00
Xenia Ragiadakou 3652701608 staging: rtl8192u: fix comments in r819xU_HTType.h
This patch fixes comments in r819xU_HTType.h by:
* replacing // commments with /* */ comments
* removing author and date information from comments
* removing unnecessary comments

This is done to improve code readability.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:54 -07:00
Xenia Ragiadakou 5b33b605e2 staging: rtl8192u: fix space around braces in r819xU_HTType.h
This patch fixes the white space around braces in r819xU_HTType.h according
to the linux kernel coding style.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:54 -07:00
Xenia Ragiadakou 889cfe2f03 staging: rtl8192u: use __packed instead of __attribute__((packed))
This patch fixes the following checkpatch warning:
WARNING: __packed is preferred over __attribute__((packed))

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:54 -07:00
Xenia Ragiadakou f96f8df28c staging: rtl8192u: fix open brace position in r819xU_cmdpkt.h
This patch fixes the following checkpatch warning and error:
WARNING: missing space after enum definition
ERROR: open brace '{' following enum go on the same line

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:54 -07:00
Xenia Ragiadakou feada066c8 staging: rtl8192u: fix alignment in r819xU_cmdpkt.h
This patch fixes alignment issues in r819xU_cmdpkt.h to improve code
readability.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:53 -07:00
Xenia Ragiadakou acd537427c staging: rtl8192u: fix space after ( in r819xU_cmdpkt.h
This patch removes prohibited space after ( in r819xU_cmdpkt.h according to
the linux kernel coding style convention.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:53 -07:00
Xenia Ragiadakou b7cc1d0ce9 staging: rtl8192u: fix space at the start of lines in r819xU_cmdpkt.h
This patch fixes the following checkpatch warning:
WARNING: please, no spaces at the start of a line

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:53 -07:00
Xenia Ragiadakou 56340097ca staging: rtl8192u: fix comments in r819xU_cmdpkt.h
This patch fixes the comments in r819xU_cmdpkt.h by:
* removing any empty or unnecessary comments
* replacing the // comments with /* */ comments
* removing date and author information from comments

This is done to improve code readability and to conform to linux kernel
coding style.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:53 -07:00
Xenia Ragiadakou b777736b47 staging: rtl8192u: fix line size in r819xU_cmdpkt.h
This patch reduces the line length below 80 chars to improve code readability.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:53 -07:00
Xenia Ragiadakou 8f519cad49 staging: rtl8192u: add space after } and , in r819xU_cmdpkt.h
This patch fixes white space after } and , so that the code becomes more
readable and conforms to the linux kernel coding style.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:53 -07:00
Xenia Ragiadakou aa0cb59cfa staging: rtl8192u: remove #ifdef JOHN_
This patch removes the guards #ifdef JOHN_HWSEC, #ifdef JOHN_DUMP_TXDESC and
because the code inside them calls some undefined functions (e.g read_rtl8225,
rtl8187_read_phy etc).

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:53 -07:00
Sachin Kamat b806ad483a staging: vt6655: Use NULL instead of 0
Use NULL instead of 0 for pointer.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:36:31 -07:00
Sachin Kamat 875d2a134e staging: rtl8192u: Use NULL instead of 0
Use NULL instead of 0 for pointer.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:36:31 -07:00
Sachin Kamat 440ca3f0c5 staging: lirc: Do not use 0 for NULL pointer
Do not use 0 for NULL pointer.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Jarod Wilson <jarod@wilsonet.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:36:31 -07:00
Sachin Kamat 968a4e9208 staging: dgnc: dgnc_tty: Do not use 0 for NULL pointer
Do not use 0 for NULL pointer.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:36:31 -07:00
Sachin Kamat aad7b60bf1 staging: lustre: Do not use 0 for NULL pointer in console.c
Do not use 0 for NULL pointer.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:36:30 -07:00
Sachin Kamat a0d6f2b1da staging: line6: midi: Use NULL instead of 0 for pointers
Use NULL instead of 0 for pointers.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:36:30 -07:00
Sachin Kamat 53fa1f4f1f staging: dgap: dgap_tty: Do not use 0 for pointers
0 should not be used instead of NULL for pointers.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:36:30 -07:00
Sachin Kamat fa5cd4cf1b staging: dgap: dgap_fep5: Do not use 0 for NULL pointer
Do not compare NULL pointer with 0.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:36:30 -07:00
Sachin Kamat 0b5aff00a7 staging: dgap: dgap_fep5: Remove braces around return
Braces are not needed around return values.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:36:30 -07:00
Sachin Kamat 565c509587 staging: dgap: dgap_fep5: Remove braces around single line statements
Single line statements do not require braces.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:36:30 -07:00
Ian Abbott d8515652ef staging: comedi: s626: prefix macros in s626.h
Prefix the names of all the macros defined in "s626.h" with `S626_`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:34:22 -07:00
Ian Abbott 676921c9d2 staging: comedi: s626: prefix macros in s626.c
Prefix the macros defined in "s626.c" with `S626_`.  Macro `VECT0` is
unused, so remove it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:34:22 -07:00
Ian Abbott 31de1948d8 staging: comedi: s626: prefix function and variable names
Add the prefix `s626_` to all the static variables and functions that
don't already have it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:34:22 -07:00
Ian Abbott dbb263f5bd staging: comedi: s626: rename struct buffer_dma
Re-tag `struct buffer_dma` to `struct s626_buffer_dma` to avoid
potential namespace clashes.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:34:21 -07:00
Ian Abbott 8e06d66287 staging: comedi: s626: move struct buffer_dma
Move the declaration of `struct buffer_dma` from "s626.h" to "s626.c" as
it seems more at home there.  After this move, "s626.h" just contains
macros related to hardware registers.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:34:21 -07:00
Ian Abbott a3ae88f83b staging: comedi: s626: make trimchan[] and trimadrs[] const
Declare the static variables `trimchan[]` and `trimadrs[]` as constant
data.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:34:21 -07:00
Ian Abbott bb49cddc02 staging: comedi: s626: add mmiowb() calls
`s626_mc_enable()` is often called to enable some function in a control
register after setting up some other registers.  Precede the write to
the control register with a call to `mmiowb()` to preserve mmio write
ordering.

`s626_mc_disable()` is called to disable some function in a control
register and is often followed up by writes to other registers.  Follow
the write to the control register with a call to `mmiowb()` to preserve
mmio write ordering.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:34:21 -07:00
Ian Abbott c3e3a56d40 staging: comedi: s626: remove TRUE and FALSE macros
"s626.h" defines the macros `TRUE` and `FALSE` if they are not already
defined, yielding the expected numeric values.  Remove the macros and
replace their usage with the values `true` and `false`, respectively.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:34:21 -07:00
Ian Abbott 3f1f219ce1 staging: comedi: s626: move s626_enc_chan_info[]
Move `s626_enc_chan_info[]` and remove its forward declaration.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:34:21 -07:00
Ian Abbott bc284a2aa5 staging: comedi: s626: move encoder functions part 3
Move the final lot of encoder functions to help avoid the forward
declaration of `s626_enc_chan_info[]`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:34:20 -07:00
Ian Abbott 17afeac2fd staging: comedi: s626: move encoder functions part 2
Move some more functions to help avoid the forward declaration of
`s626_enc_chan_info[]`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:34:20 -07:00
Ian Abbott 010be96fb6 staging: comedi: s626: move encoder functions part 1
Move some functions to help avoid the forward declaration of
`s626_enc_chan_info[]`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:34:20 -07:00
Ian Abbott 3a305a66bb staging: comedi: s626: remove encpriv macro
The `encpriv` macro relies on a local variable `dev` (of type `struct
comedi_device *`) being set correctly.  By a convoluted path involving
the `private` data pointer of subdevice 5 (the encoder (counter)
subdevice), the macro always yields a pointer to the first element of
the static array `enc_private_data[]`.  That holds statically constant
data for each of 6 encoder channels.

Instead of using the `encpriv` macro, just access the array it points to
directly and get rid of the macro.  Don't bother initializing the
`private` member of the encoder subdevice any more.  Since
`enc_private_data[]` now has nothing to so with subdevice private data,
rename `enc_private_data[]` to `s626_enc_chan_info[]` and rename its
type from `struct enc_private` to `struct s626_enc_info`.  Since the
array contains unchanging, static information, declare it `const` and
declare all the variables that point to it `const`.

A forward declaration of `s626_enc_chan_info[]` has been added
temporarily and will be removed by a later patch.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:34:20 -07:00
Ian Abbott f1f7efce3b staging: comedi: s626: rename CamelCase variables
Rename the remaining CamelCase parameters and variables.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:34:20 -07:00
Ian Abbott 19436a0dd7 staging: comedi: s626: rename CamelCase functions
Rename the remaining non-lower-case functions.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:34:20 -07:00
Ian Abbott cffd7ab946 staging: comedi: s626: remove a variable from set_mode_a() and _b()
The `set_mode_a()` and `set_mode_b()` functions use a local variable
`setup` which is initialized to the value of parameter `Setup` which is
not used further.  Get rid of the local variable and rename the
parameter to `setup`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:34:19 -07:00
Ian Abbott b075ac8e93 staging: comedi: s626: rename CamelCase in struct enc_private
Rename the CamelCase members of `struct enc_private`.  Since most of
those are function pointers pointing to functions with similar names as
the members, rename the functions they point to as well.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:34:19 -07:00
Ian Abbott 07a36d66fa staging: comedi: s626: rename CamelCase in struct s626_private
Rename the CamelCase members of `struct s626_private`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:34:19 -07:00
Ian Abbott 3a3875067e staging: comedi: s626: replace CamelCase struct bufferDMA
Rename `struct bufferDMA` and its members to avoid CamelCase.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:34:19 -07:00
Ian Abbott 6e3fc69d4c staging: comedi: s626: remove duplicate macros I2C_B0, I2C_B1, I2C_B2
The `I2C_B0(ATTR, VAL)`, `I2C_B1(ATTR, VAL)` and `I2C_B2(ATTR, VAL)`
macros are defined identically in "s626.h" and "s626.c".  Remove the
duplicates from "s626.c".

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:34:19 -07:00
Ian Abbott d5512f5b5b staging: comedi: s626: remove I2CR and I2CW macros
The `I2CR` and `I2CW` macros expand to the I2C read and write addresses,
respectively.  They are only used in one place each and include the name
of a local variable `devpriv` in their expansion.

Get rid of the macros and expand them in place.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:34:19 -07:00
Ian Abbott e6132fc9ad staging: comedi: s626: rename ai_continous
Rename the `ai_continous` member of `struct s626_private` to
`ai_continuous`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:34:18 -07:00
Ian Abbott 498c5070cf staging: comedi: s626: remove PCI ID defines
The Sensoray 626 is based on the Philips SAA7146 chip using the Philips
vendor and device ID for the chip, but with custom subdevice and
subvendor IDs.  Use the Philips IDs in the PCI device table and replace
the macros for the subvendor and subdevice IDs with open-coded values.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:34:18 -07:00
Ian Abbott 869db884c7 staging: comedi: s626: remove unused DMAHandle
The `DMAHandle` member of `struct bufferDMA` in "s626.h" is unused, so
remove it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:34:18 -07:00
Ian Abbott 730b8e1557 staging: comedi: s626: convert a printk()
Convert a printk() to a dev_err().

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:34:18 -07:00
Ian Abbott 8ee5261141 staging: comedi: s626: tidy up main source code file
Tidy up the source code in "s626.c" and make it (slightly) more
readable.  It's mostly whitespace changes although some large statements
have been split into smaller statements.  It fixes most of the
checkpatch errors and warnings.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:34:18 -07:00
Ian Abbott 7f32c7c444 staging: comedi: s626: tidy up comments at top of file
Make the comments at the top of the file conform to the CodingStyle.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:34:18 -07:00
Ian Abbott eb4700edd9 staging: comedi: s626: tidy the header file a bit
Tidy up the "s626.h" header file a bit, cleaning up the whitespace and
fixing overlength lines.  Add multiple inclusion protection (even though
it's only included once and only by "s626.c").  Remove unnecessary
driver comment near the start of the file as it is more or less the same
as the one in "s626.c".  Remove obviously unused/useless stuff.

I'm not sure what to do about the INTEL/MOTOROLA platform selection in
the file.  I've left it alone (set to INTEL) for now.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:34:17 -07:00
Philipp Zabel bd3665c94a staging: drm/imx: Enable DRM PRIME support
Lets the IPU driver make use of the PRIME functionality introduced
by the "drm: GEM CMA: Add DRM PRIME support" patch.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:30:34 -07:00
Philipp Zabel b8d181e408 staging: drm/imx: add drm plane support
This patch adds support for a drm overlay plane on DI0 using the DP.
In principle, the overlay plane could also be used on DI1, but to switch
the overlay plane between display interfaces, the base planes would have
to be exchanged transparently while both display interfaces are inactive.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:30:33 -07:00
Sascha Hauer 6ee4d7fe1b staging: drm/imx: fix pageflip events during device close
During a device close the drm core frees all pending events in
drm_events_release(). If at that time a pageflip is pending the
interrupt handler will try to complete the now unitialized
event resulting in a NULL pointer exception. Seen on imx-drm
when userspace is killed during a page flip.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:30:33 -07:00
Philipp Zabel b8fbb34181 staging: drm/imx: ipuv3-crtc: remove unused struct ipu_framebuffer
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:30:33 -07:00
Philipp Zabel 974aa74318 staging: drm-imx: add DRM_FORMAT_BGR888 to ipu crtc driver
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:30:33 -07:00
Sascha Hauer fb822a395f staging: drm/imx: make waiting for idle channel optional
Currently we wait for a channel until it's idle before actually
disabling it. This is not needed for all channels though, so make
waiting for idle a separate function and call it where necessary.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:30:33 -07:00