1
0
Fork 0
Commit Graph

616722 Commits (2d6d840a5a93c9493554d36cacabac797b441972)

Author SHA1 Message Date
Vlad Dogaru 2d6d840a5a mailmap: update Vlad Dogaru email address
Replace my previous employer address.

Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-08-29 20:16:03 +01:00
Baoyou Xie a565a03faf fix:iio:common:st_sensors:st_sensors_trigger:mark symbols static where possible
We get 2 warnings when biuld kernel with W=1:
drivers/iio/common/st_sensors/st_sensors_trigger.c:69:13: warning: no previous prototype
for 'st_sensors_irq_handler' [-Wmissing-prototypes]
drivers/iio/common/st_sensors/st_sensors_trigger.c:85:13: warning: no previous prototype
for 'st_sensors_irq_thread' [-Wmissing-prototypes]

In fact, these functions are only used in the file in which they are
declared and don't need a declaration, but can be made static.
so this patch marks these functions with 'static'.

Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-08-29 20:13:12 +01:00
Wei Yongjun 96303e2027 iio: magn: ak8974: remove .owner field for driver
Remove .owner field if calls are used which set it automatically.

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-08-29 20:12:10 +01:00
Arnd Bergmann 5bc55ef31f iio: magn/ak8974: avoid unused function warning
The ak8974_configure() function is used only from the PM code,
but that can be hidden when CONFIG_PM is disabled:

drivers/iio/magnetometer/ak8974.c:201:12: error: 'ak8974_configure' defined but not used [-Werror=unused-function]

This replaces the #ifdef with a __maybe_unused annotation, which
will work correctly in all configurations and avoid the warning,
as the compiler can now see where ak8974_configure is called from.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 7c94a8b2ee ("iio: magn: add a driver for AK8974")
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-08-29 19:54:55 +01:00
Arnd Bergmann 2e1f44d8a7 iio: hid-sensors: avoid unused function warning
A small rework of the PM code in this driver introduced a harmless
warning when CONFIG_PM_SLEEP is not set:

drivers/iio/common/hid-sensors/hid-sensor-trigger.c:212:12: error: 'hid_sensor_resume' defined but not used [-Werror=unused-function]

This removes the #ifdef and instead marks all three PM functions
as __maybe_unused, which covers all possible cases and is harder
to get wrong.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 7f6cf74145 ("iio: hid-sensors: use asynchronous resume")
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-08-29 19:54:08 +01:00
Wei Yongjun 943bbe743c iio: adc: ti-ads1015: add missing of_node_put() in ads1015_get_channels_config_of()
When terminating for_each_child_of_node() iteration with
break or return, of_node_put() should be used to prevent
stale device node references from being left behind.

This is detected by Coccinelle semantic patch.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-08-29 19:51:17 +01:00
Wei Yongjun 16335bcbf9 iio: temperature: fix non static symbol warnings
Fixes the following sparse warnings:

drivers/iio/temperature/maxim_thermocouple.c:35:28: warning:
 symbol 'max6675_channels' was not declared. Should it be static?
drivers/iio/temperature/maxim_thermocouple.c:52:28: warning:
 symbol 'max31855_channels' was not declared. Should it be static?
drivers/iio/temperature/maxim_thermocouple.c:98:38: warning:
 symbol 'maxim_thermocouple_chips' was not declared. Should it be static?

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-By: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-08-29 19:49:00 +01:00
Linus Walleij aeb55fff38 iio: st_sensors: fetch and enable regulators unconditionally
These sensors all have Vdd and Vdd_IO lines. This means the
supplies are *not* optional (optional means that the supply is
optional in the electrical sense, not the software sense)
so we need to get the and enable them at all times.

If the device tree or board file does not define suitable
regulators for the component, it will be substituted by a
dummy regulator, or, if regulators are disabled altogether,
by stubs. There is no need to use the IS_ERR_OR_NULL() check
that is considered harmful.

Cc: Giuseppe Barba <giuseppe.barba@st.com>
Cc: Denis Ciocca <denis.ciocca@st.com>
Cc: Crestez Dan Leonard <leonard.crestez@intel.com>
Cc: Gregor Boirie <gregor.boirie@parrot.com>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-08-29 19:41:09 +01:00
Gwenhael Goavec-Merou 7f270bc9a2 iio: dac: AD8801: add Analog Devices AD8801/AD8803 support
Add support for Analog Devices AD8801/AD8803, 8 channels 8bits, Digital to
Analog converters.

Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-08-29 18:20:01 +01:00
Matt Ranostay 9d1894cd19 iio: chemical: vz89x: prevent corrupted buffer from being read
Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-08-29 18:00:46 +01:00
Matt Ranostay 0a735aa07f iio: chemical: vz89x: add support for VZ89TE part
Add support the VZ89TE variant which removes the voc_short channel,
and has CRC check for data transactions.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-08-29 18:00:06 +01:00
Matt Ranostay 8376882f16 iio: chemical: vz89x: abstract chip configuration
Abstract chip configuration data to allow supporting multiple variants
of the VZ89 chemical sensor line.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-08-29 17:46:52 +01:00
Alison Schofield 8c9e7b1bf4 iio: adc: ltc2485: add support for Linear Technology LTC2485 ADC
Adds basic support for the LTC2485 ADC - a delta-sigma analog-to-digital
converter with an I2C interface that operates in single shot conversion
mode.

The driver supports an on board 5V reference and the power-on default
configuration which rejects both 50hz & 60hz line frequencies and
operates in 1x speed mode.

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Cc: Daniel Baluta <daniel.baluta@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-08-29 16:57:40 +01:00
Clifton Barnes a5211b0d06 staging: iio: accel: sca3000: remove extra space
fix checkpatch.pl warning about 'Statements should start on a
tabstop'

Signed-off-by: Clifton Barnes <clifton.a.barnes@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-08-29 16:29:08 +01:00
Matt Ranostay 6356f1b9b7 iio: iio-utils: use channel modifier scaling if it exists
Now there are channel modifiers with their own scaling those should be
used when possible over the generic channel type scaling.

Examples are of IIO_TEMP channel having a generic scaling value, and
another having IIO_MOD_TEMP_AMBIENT modifier with another scaling value.

Previously the first scaling value for a channel type would be applied
to all channels of like type in iio_generic_buffer

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-08-29 16:26:41 +01:00
Colin Ian King 9d47964bfd iio: ad5755: fix off-by-one on devnr limit check
The comparison for devnr limits is off-by-one, the current check
allows 0 to AD5755_NUM_CHANNELS and the limit should be in fact
0 to AD5755_NUM_CHANNELS - 1.  This can lead to an out of bounds
write to pdata->dac[devnr]. Fix this by replacing > with >= on the
comparison.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Fixes: c947459979 ("iio: ad5755: add support for dt bindings")
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-08-29 16:15:24 +01:00
Greg Kroah-Hartman d5bd1eba19 First round of new features, device support and cleanups for IIO in the 4.9 cycle.
Device support
 
 * ak8974
   - New driver and bindings for this 2009 vintage magnetometer (it was very
     popular back then!)
 * atlas-ph-sensor
   -  ORP sensor support(I had to look up what one of these was)
 * cio-dac
   - New driver for Measurement Computing DAC boards
 * dmard06
   - New driver for Domintech DMARDO6 accelerometer. Also vendor prefix.
 * dmard09
   - New driver for Domintech DMARD09 accelerometer.
 * maxim-thermocouple
   - max6675 and max31855 new driver
 * mt6577 auxdac
   - new driver for this Mediatek chip mt2701, mt6577 and mt8173 have this
     hardware.
 * ti-adc161s626
   - new driver for this TI single channel differential ADC.
 * vcnl4000
   - support vcnl4010 and vcnl4020 which are compatible for all features
     currently supported by this driver.
 
 New features
 
 * Core
   - Allow retrieving of underlying iio_dev from a callback buffer handle.
     This is needed to allow client drivers to perform operations such as
     configuring the trigger used.
 * hid-sensors
   - asynchronous resume support to avoid really long resume times.
 * kxcjk-1013
   - add the mysterious KIOX000A ACPI id seen in the wild.
 * Tools
   - lsiio now enumerates processed as well as raw channels.
 
 Cleanup
 
 * ad7298
   - use iio_device_claim_direct_mode and friends to simplify locking around
     mode switching and drop some boilerplate.
 * ad7793
   - use iio_device_claim_direct_mode and friends to simplify locking around
     mode switching and drop some boilerplate.
 * ade7854
   - checkpatch fixups (alignment of parameters)
 * atlas-ph-sensor
   - use iio_device_claim_direct_mode and friends to simplify locking around
     mode switching and drop some boilerplate.
   - Switch to REGCACHE_NONE as there are no useful register to cache.
 * bma180
   - use iio_device_claim_direct_mode and friends to simplify locking around
     mode switching and drop some boilerplate.
 * hdc100x
   - Add mention of the HDC1000 and HDC1008 to the Kconfig help text.
 * isl29018
   - Add driver specific prefixes to defines and function names.
   - Remove excessive logging.
   - Drop newlines which add nothing to readability.
   - General tidying up of comments.
   - Drop I2C_CLASS_HWMON as irrelevant to driver.
 * isl29028
   - Add driver specific prefixes to defines, enums and function names.
   - Drop comma's from available attribute output as not ABI compliant.
   - Drop I2C_CLASS_HWMON as irrelevant to driver.
 * kxsd9
   - devicetree bindings.
 * mag3110
   - This one wasn't locking to protect against mode switches during
     raw_reads.  Use the iio_claim_direct_mode function to fix this buglet.
 * maxim-theromcouple
   - Fix missing selects for triggered buffer support in Kconfig.
 * nau7802
   - Use complete instead of complete_all as only one completion at a time.
 * sx9500
   - Use complete instead of complete_all as only one completion at a time.
 * us5182d
   - Add a missing error code asignment instead of checking the result of
     an already checked statement.
 * vcnl4000
   - Use BIT macro where appropriate.
   - Refactor return codes in read_raw callback.
   - Add some missing locking for concurrent accesses to the device.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIuBAABCAAYBQJXvMBjERxqaWMyM0BrZXJuZWwub3JnAAoJEFSFNJnE9BaInZAP
 /0yQg+tm9eBpjaVAdfV2ecuf0hVNdCjFg/7n5MLuSN1aDTPRn3O3nuwp8R8ARoe+
 7ctBFTIOJVqQpLYpunde1iJcOtEk2DIJEnxZQJjExOgn7AwIS4fgqSZQP7u5vDoT
 xrZe8nf5fcvMa1KIvWAadDNflYnn+Ug464Vt8tTdxL6XBIj0xcf8i62aS44XgGwS
 6boHXW0pVg1/QtvJmuajVCdxSouZyikDXWEpJx0UUlLmv2enF+KaJnKVwfbQ7rf/
 UG5ZhdOarbD4miXm8YC+x46v9FeWysatVpMu7Ch5LHrVVvBQCjIubcsZX/qH9cbS
 5VfV00NENHkNEnUL8luVAbLbwxLSq9pFy3LjJOzWmGlBQxT8X6uinA3XbZoqdouf
 5qu+TFUg1RDkL/6GSOsZ4EAGJfY7D9bCbQ0LQUaqPfcdAFZToE8ldLHapU1GtYjt
 Tj0xUxlzQ3fsRH6hTyhy2goAw0s88ruxcUpld8chCd2JWWD2OZJf7TzHGJ2GuuAj
 2yIYXjlVSKlM9yNCrFOyBrKxeg9n5eQI2f9KBiZZpNzxO2dFwaJkAiMF09sleTVv
 7O58g86ywrohp0eT/1sX6qYENJhZROPJGFMbYVHXhWwD1tqGs69zFVGa6ndL1i7w
 MXJ7c+1XjnaAuHEIPRyGZ6/Np27z6Jz0CpxGB4CyHseS
 =d6Kh
 -----END PGP SIGNATURE-----

Merge tag 'iio-for-4.9a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into work-testing

Jonathan writes:

First round of new features, device support and cleanups for IIO in the 4.9 cycle.

Device support

* ak8974
  - New driver and bindings for this 2009 vintage magnetometer (it was very
    popular back then!)
* atlas-ph-sensor
  -  ORP sensor support(I had to look up what one of these was)
* cio-dac
  - New driver for Measurement Computing DAC boards
* dmard06
  - New driver for Domintech DMARDO6 accelerometer. Also vendor prefix.
* dmard09
  - New driver for Domintech DMARD09 accelerometer.
* maxim-thermocouple
  - max6675 and max31855 new driver
* mt6577 auxdac
  - new driver for this Mediatek chip mt2701, mt6577 and mt8173 have this
    hardware.
* ti-adc161s626
  - new driver for this TI single channel differential ADC.
* vcnl4000
  - support vcnl4010 and vcnl4020 which are compatible for all features
    currently supported by this driver.

New features

* Core
  - Allow retrieving of underlying iio_dev from a callback buffer handle.
    This is needed to allow client drivers to perform operations such as
    configuring the trigger used.
* hid-sensors
  - asynchronous resume support to avoid really long resume times.
* kxcjk-1013
  - add the mysterious KIOX000A ACPI id seen in the wild.
* Tools
  - lsiio now enumerates processed as well as raw channels.

Cleanup

* ad7298
  - use iio_device_claim_direct_mode and friends to simplify locking around
    mode switching and drop some boilerplate.
* ad7793
  - use iio_device_claim_direct_mode and friends to simplify locking around
    mode switching and drop some boilerplate.
* ade7854
  - checkpatch fixups (alignment of parameters)
* atlas-ph-sensor
  - use iio_device_claim_direct_mode and friends to simplify locking around
    mode switching and drop some boilerplate.
  - Switch to REGCACHE_NONE as there are no useful register to cache.
* bma180
  - use iio_device_claim_direct_mode and friends to simplify locking around
    mode switching and drop some boilerplate.
* hdc100x
  - Add mention of the HDC1000 and HDC1008 to the Kconfig help text.
* isl29018
  - Add driver specific prefixes to defines and function names.
  - Remove excessive logging.
  - Drop newlines which add nothing to readability.
  - General tidying up of comments.
  - Drop I2C_CLASS_HWMON as irrelevant to driver.
* isl29028
  - Add driver specific prefixes to defines, enums and function names.
  - Drop comma's from available attribute output as not ABI compliant.
  - Drop I2C_CLASS_HWMON as irrelevant to driver.
* kxsd9
  - devicetree bindings.
* mag3110
  - This one wasn't locking to protect against mode switches during
    raw_reads.  Use the iio_claim_direct_mode function to fix this buglet.
* maxim-theromcouple
  - Fix missing selects for triggered buffer support in Kconfig.
* nau7802
  - Use complete instead of complete_all as only one completion at a time.
* sx9500
  - Use complete instead of complete_all as only one completion at a time.
* us5182d
  - Add a missing error code asignment instead of checking the result of
    an already checked statement.
* vcnl4000
  - Use BIT macro where appropriate.
  - Refactor return codes in read_raw callback.
  - Add some missing locking for concurrent accesses to the device.
2016-08-23 17:50:16 -04:00
Christian Gromm 1d9e3a07cb staging: most: aim-cdev: destroy ida struct in case of exception
This patch is needed to clean up the initialized ida structure in case
the function exits with an exception.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-22 16:41:00 -04:00
James Simmons 88b090e3c0 staging: lustre: mdc: fix NULL pointer dereference in mdc_adjust_dirpages
The function mdc_adjust_dirpages is only called on platforms which
don't have pages 4K in size which is why kbuild only reported this
for platforms like the Alpha. The problem was a typo in ordering of
variables in the beginning of a while loop. We were accessing the
dp pointer before it was kmapped.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-22 16:39:15 -04:00
Oleg Drokin f5a9a15f8f staging/lustre: Remove unused cp_error from struct cl_page
cp_error member is not really set anywhere, so kill
it and the only printing user of it too.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 18:16:13 -04:00
Oleg Drokin 24c198e956 staging/lustre: Make alignment match open parenthesis
This patch fixes most of checkpatch occurences of
"CHECK: Alignment should match open parenthesis"
in Lustre code.

Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 18:16:12 -04:00
Oleg Drokin cd94f231a7 staging/lustre: Add spaces preferred around that '{+, -, *, /, |, <<, >>, &}'
This patch fixes all checkpatch occurences of
"CHECK: spaces preferred around that '{+,-,*,/,|,<<,>>,&}' (ctx:VxV)"
in Lustre code.

Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 18:16:12 -04:00
Linus Walleij 87557ade38 iio: accel: kxsd9: Add device tree bindings
This accelerometer can be probed from the device tree, so it needs
to have proper documentation of it's device tree bindings.

Cc: devicetree@vger.kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-08-21 20:41:05 +01:00
Srinivas Pandruvada 7f6cf74145 iio: hid-sensors: use asynchronous resume
Some platforms power off sensor hubs during S3 suspend, which will require
longer time to resume. This hurts system resume time, so resume
asynchronously.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-08-21 20:12:32 +01:00
Zhiyong Tao ace4cdfe67 iio: adc: mt2701: Add Mediatek auxadc driver for mt2701.
Add Mediatek auxadc driver based on iio.
It will register a device in iio and support iio.
So thermal can read auxadc channel to sample data by iio device.
It is tested successfully on mt2701 platform.
Mt8173 and mt6577 platforms are not tested.
But the expectation is compatible.

Signed-off-by: Zhiyong Tao <zhiyong.tao@mediatek.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-08-21 19:54:30 +01:00
Zhiyong Tao 3ad16a39ed dt-bindings: auxadc: Add binding document for Mediatek auxadc.
The commit adds the device tree binding documentation for the mediatek
auxadc found on Mediatek MT2701.
Thermal gets auxadc sample data by iio device.
So the commit changes auxadc device tree binding documentation from
/soc/mediatek/auxadc.txt to /iio/adc/mt6577_auxadc.txt.

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Zhiyong Tao <zhiyong.tao@mediatek.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-08-21 19:53:11 +01:00
Alison Schofield e24544553b iio: temperature: add Kconfig selects for triggered buffer
Select IIO_BUFFER and IIO_TRIGGERED_BUFFER to compile maxim_thermocouple.

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Cc: Daniel Baluta <daniel.baluta@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-08-21 19:50:44 +01:00
Alison Schofield 197399dcd7 iio: magnetometer: mag3110: claim direct mode during raw reads
Driver was checking for direct mode but not locking it.  Use
claim/release helper functions to guarantee the device stays
in direct mode during raw reads.

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Cc: Daniel Baluta <daniel.baluta@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-08-21 19:37:35 +01:00
Louie Lu 10adcce696 staging: rts5208: Change data type to unsigned int.
This patch fixes a minor checkpatch warning:

"WARNING: Prefer 'unsigned int' to bare use of 'unsigned'"

Signed-off-by: Louie Lu <louie.lu@hopebaytech.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 18:37:36 +02:00
Quentin Lambert 0b25e9fa01 staging: rts5208/ms.c: add missing releases in mg_get_local_EKB and mg_get_ICV
mg_get_local_EKB and mg_get_ICV used to return with an error code before
releasing all resources. This patch add a jump to the appropriate label
ensuring that the resources are properly released before returning.

This issue was found with Hector.

Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 18:37:36 +02:00
Quentin Lambert 541e4d2d1d staging: rts5208/ms.c: change the label name to respect the coding style
This patch changes label names using camel case to snake case as well as giving
a new name representing what will be done after the label.

Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 18:37:36 +02:00
Jonas Rickert d5b7d2b02c Staging: rts5208: fix double blank line coding style issues
This is a patch for double blank lines and a missing blank line reported
by checkpatch.pl

Signed-off-by: Jonas Rickert <jrickertkc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 18:37:36 +02:00
Shiva Kerdel 22274c15e2 Staging: rtl8723au: rtw_ieee80211: Fixed operators spacing style issues
Fixed spaces around operators to fix their coding style issues.

Signed-off-by: Shiva Kerdel <shiva@exdev.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 18:35:46 +02:00
Colin Ian King 9731ee8973 staging: rtl8723au: hal: check BT_Active and BT_State with correct bit pattern
BT_Active and BT_State are being masked with 0x00ffffff so it the subsequent
comparisons with 0xffffffff are therefore a buggy check.  Instead, check them
against 0x00ffffff.

Unfortunately I couldn't find a datasheet or hardware to see if 0xffffffff
is an expected invalid bit pattern that should be checked before BT_Active and
BT_State are masked with 0x00ffffff, so for now, this fix seems like the least
risky approach.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 18:35:46 +02:00
Paul Gortmaker 37f144008a staging: fsl-mc: make bus/mc-bus explicitly non-modular
The Kconfig currently controlling compilation of this code is:

config FSL_MC_BUS
        bool "Freescale Management Complex (MC) bus driver"

...meaning that it currently is not being built as a module by anyone.

Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.

Since the code was already not using module_init, we don't have to change
the initcall and the init ordering remains unchanged with this commit.

We also delete the MODULE_LICENSE tag etc. since all that information
is already contained at the top of the file in the comments.

We don't replace module.h with init.h since the file does make some
references to "struct *module" for processing other modules.

Cc: "J. German Rivera" <German.Rivera@freescale.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: devel@driverdev.osuosl.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 18:32:26 +02:00
Nipun Gupta df5e9b5fbc fsl-mc: add helper macro to determine if a device is of fsl_mc type
Add a helper macro to return if a device has a bus type of fsl_mc.
This makes the bus driver code more readable and provides a way for
drivers like the SMMU driver to easily check the bus type.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Signed-off-by: Bharat Bhushan <bharat.bhushan@nxp.com>
Acked-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 18:32:26 +02:00
Binoy Jayan 243d38aab2 staging: r8723au: Remove unused semaphores
The semaphores xmit_sema, terminate_xmitthread_sema, tx_retevt and
io_req have no users, hence remove all references to them.
Semaphores are going away in the future.

Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 18:30:35 +02:00
Binoy Jayan 3948506668 staging: r8723au: pwrctrl_priv: Replace semaphore lock with mutex
The semaphore 'lock' in pwrctrl_priv is a simple mutex, so it should
be written as one. Semaphores are going away in the future.

Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 18:30:35 +02:00
Larry Finger 1335a9516d staging: r8188eu: Fix scheduling while atomic splat
Commit fadbe0cd52 ("staging: rtl8188eu:
Remove rtw_zmalloc(), wrapper for kzalloc()") changed all allocation
calls to be GFP_KERNEL even though the original wrapper was testing
to determine if the caller was in atomic mode. Most of the mistakes
were corrected with commit 33dc85c3c6
("staging: r8188eu: Fix scheduling while atomic error introduced in
commit fadbe0cd"); however, two kzalloc calls were missed as the
call only happens when the driver is shutting down.

Fixes: fadbe0cd52 ("staging: rtl8188eu: Remove rtw_zmalloc(), wrapper for kzalloc()")
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 18:29:41 +02:00
Larry Finger bc83c4cfc2 staging: r8188eu: Remove some false positives from kmemleak
When this driver preallocates some SKBs, kmemleak is unable to find that
allocated memory when it scans. When the driver is unloaded, that memory
is released; therefore, the report is a false positive.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 18:28:59 +02:00
Larry Finger 580b410553 staging: r8712u: Handle some false positives from kmemleak
When this driver preallocates some URBs, kmemleak is unable to find that
allocated memory when it scans. When the driver is unloaded, that memory
is reclaimed, therefore, the report is a false positive.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 18:28:49 +02:00
Larry Finger 78ece0b945 staging: r8712u: Fix leak of skb
There are two types of messages queued for RX. The major type, which does
I/O on the device, was being handled properly. The skbs that communicated
with the firmware were being leaked.

While rewriting the code that sets up the skb, it was possible to remove
the private variable indicating that the old skb could be reused.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 18:28:49 +02:00
Larry Finger 74a3b060bc staging: r8712u: Check pointer before use
Routine r8712_usb_read_port() dereferences "precvbuf" before testing it
for NULL.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 18:28:49 +02:00
Parth Sane d25f658df2 staging: rtl8712: Fixed multiple parenthesis alignment warnings in ieee80211.c
Multiple parenthesis alignment warnings were thrown by checkpatch in ieee80211.c
This patch effectively fixes that.

Signed-off-by: Parth Sane <laerdevstudios@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 18:26:45 +02:00
Anuradha Weeraman af07477f59 Staging: rtl8712: Fixed brace and comment style issue
Fixed issues with coding style.

Signed-off-by: Anuradha Weeraman <anuradha@weeraman.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 18:26:45 +02:00
Binoy Jayan 7c2bb7aff9 rtl8712: intf_priv: Replace semaphore lock with completion
The semaphore 'lock' in 'intf_priv' is used as completion,
so convert it to a struct completion type.

Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 18:25:47 +02:00
Binoy Jayan 204a8ac1db rtl8712: Replace semaphore terminate_cmdthread_sema with completion
The semaphore 'terminate_cmdthread_sema' is used as completion,
so convert it to a struct completion type.

Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 18:25:47 +02:00
Binoy Jayan 0f89054a0f rtl8712: Replace semaphore cmd_queue_sema with completion
The semaphore 'cmd_queue_sema' is used as completion,
so convert it to a struct completion type.

Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 18:25:47 +02:00
Binoy Jayan 38bee763bd rtl8192e: Replace semaphore ips_sem with mutex
The semaphore 'ips_sem' in the rtl8192e is a simple mutex, so it should
be written as one. Semaphores are going away in the future.

Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 18:22:31 +02:00
Binoy Jayan be10ceea4f rtl8192e: Replace semaphore scan_sem with mutex
The semaphore 'scan_sem' in the rtl8192e is a simple mutex, so it should
be written as one. Semaphores are going away in the future.

Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 18:22:31 +02:00