openwrt/staging/blogic.git
4 years agostaging: sm750fb: Fix of long line in makefile variable
R Veera Kumar [Thu, 19 Mar 2020 09:50:52 +0000 (15:20 +0530)]
staging: sm750fb: Fix of long line in makefile variable

A simple fix of long line in makefile variable assignment.
Found using checkpatch.pl.

Signed-off-by: R Veera Kumar <vkor@vkten.in>
Link: https://lore.kernel.org/r/20200319095024.GA2970@tulip.local
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8712: Fix for long lines in Kconfig help
R Veera Kumar [Thu, 19 Mar 2020 09:55:34 +0000 (15:25 +0530)]
staging: rtl8712: Fix for long lines in Kconfig help

Fixes two long line in Kconfig help.
Found using checkpatch.pl

Signed-off-by: R Veera Kumar <vkor@vkten.in>
Link: https://lore.kernel.org/r/20200319095513.GA3078@tulip.local
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8188eu: core: Correct a typo in a comment
R Veera Kumar [Thu, 19 Mar 2020 09:33:09 +0000 (15:03 +0530)]
staging: rtl8188eu: core: Correct a typo in a comment

Correct a single typo in a comment.
Misspelling found using checkpatch.pl.

Signed-off-by: R Veera Kumar <vkor@vkten.in>
Link: https://lore.kernel.org/r/20200319093301.GA2453@tulip.local
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8188eu: include: Correct a typo in a comment
R Veera Kumar [Thu, 19 Mar 2020 09:37:24 +0000 (15:07 +0530)]
staging: rtl8188eu: include: Correct a typo in a comment

Correct a single typo in a comment.
Misspelling found using checkpatch.pl.

Signed-off-by: R Veera Kumar <vkor@vkten.in>
Link: https://lore.kernel.org/r/20200319093715.GA2550@tulip.local
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8192u: ieee80211: Correct a typo in a comment
R Veera Kumar [Thu, 19 Mar 2020 09:40:49 +0000 (15:10 +0530)]
staging: rtl8192u: ieee80211: Correct a typo in a comment

Correct a single typo in a comment.
Misspelling found using checkpatch.pl.

Signed-off-by: R Veera Kumar <vkor@vkten.in>
Link: https://lore.kernel.org/r/20200319094043.GA2669@tulip.local
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8712: Correct a typo in a comment
R Veera Kumar [Thu, 19 Mar 2020 09:44:04 +0000 (15:14 +0530)]
staging: rtl8712: Correct a typo in a comment

Correct a single typo in a comment.
Misspelling found using checkpatch.pl.

Signed-off-by: R Veera Kumar <vkor@vkten.in>
Link: https://lore.kernel.org/r/20200319094358.GA2751@tulip.local
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: unisys: Documentation: Correct a long line in doc
R Veera Kumar [Thu, 19 Mar 2020 08:57:57 +0000 (14:27 +0530)]
staging: unisys: Documentation: Correct a long line in doc

Correct a long line in documentation to respect the
80 character line limit.
Found using checkpatch.pl.

Signed-off-by: R Veera Kumar <vkor@vkten.in>
Link: https://lore.kernel.org/r/20200319085751.GA1928@tulip.local
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoStaging: qlge: Add a blank line after variable
Sam Muhammed [Thu, 19 Mar 2020 13:21:35 +0000 (09:21 -0400)]
Staging: qlge: Add a blank line after variable

Cleanup checkpatch.pl WARNINGS: Missing a blank line after declarations.

Signed-off-by: Sam Muhammed <jane.pnx9@gmail.com>
Link: https://lore.kernel.org/r/20200319132135.3362-1-jane.pnx9@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoMerge tag 'iio-5.7a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into...
Greg Kroah-Hartman [Wed, 18 Mar 2020 10:33:12 +0000 (11:33 +0100)]
Merge tag 'iio-5.7a' of git://git./linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

First set of new IIO device support, fatures and cleanups for the 5.7 cycle

Includes changes for the counter subsystem

Core Feature
* Explicitly handle sysfs values in dB, including correctly handling the
  needed postfix dB.
* Add a TODO to suggest suitable activities for new contributors to IIO now
  the vast majority of drivers are out of staging (and the remaining ones
  there are 'hard'). Also update the TODO in staging to remove stale entries.

Staging graduations
* ad7192 ADC.

New device support
* ad5770r
  - New driver for this 6 channel DAC including DT bindings.
* ad8366
  - Add supprot for the hmc1119 attenuator.
* al3010
  - New driver supporting this Dyna-image light sensors.
  - Power management and DT bindings added in additional patches.
* atlas-sensor
  - Add support for atlas DO-SM device.  Reads disolved oxygen in a solution.
* gpap002x00f
  - New driver and bindings to support the GP2AP002A00F and GP2AP002S00F light
    and proximity sensors. There is some limited existing support in
    input.  The intent is to drop this driver once IIO driver is in place.
* hmc425a
  - New driver for this attenuator.
* icp10100
  - New driver for this presure sensor.
* ltc2632
  - Add support for the ltc2636 8 channel DAC. Includes bindings and some
    tidying up of the driver.
* inv_mpu6050
  - Support IAM20680, ICM20609, ICM20689 and ICM20690.
    Includes related tidy up and rework of low pass filter bandwidth
    handling to give suitable values for all chips.

Binding conversions to yaml or missing bindings docs.
* atlas-sensor, including consolidation of previous 3 separate docs into 1.
* ad7923, previously no doc.
* max1363, split into max1238 and max1363 to simplify yaml.
* stm32-adc

Features
* (counter) 104-quad-8
  - Support a filter clock prescaler.
  - Support reporting of encoder cable status.
* ad7124
  - Low pass filter support.
  - Debugfs interface to access registers directly.
* ad8366
  - Support control of hardware gain.
* inv_mpu6050
  - Runtime pm with autosuspend.
* npcm adc
  - Add reset support. This is a breaking change if DT is not in sync,
    however this device is a BMC so the ecosystem is closed enought that
    this should not be a problem.
* srf04
  - Add power management with DT bindings for the GPIO.
* stm32-timer-trigger
  - Power management.
* (counter) stm32-timer-cnt
  - Power management.
* vcnl4000
  - Enable runtime PM for devices that don't use on demand measurement.

Cleanups and minor fixes
* core
  - Avoid double read when using debugfs.  Whilst we provide no guarantees
    on lack of side effects using the debugfs interfaces, this one is
    generate unexpected results so let us tidy it up.
* dac/Kconfig
  - Alphabetic order.
* ad5755
  - Grammar and minor other fixes.
* ad7124
  - Fail probe if get_voltage fails as no meaningful readings can be had
    without knowing the external reference.
  - Switch to selection between different channel attributes rather than
    building the arrays at runtime.
  - Remove the spi_device_id table as the driver cannot be probled without
    more information that can be provided without dt.
  - Update sysfs docs to provide more inormation and bring remaining docs for
    this part out of staging.
* ad9292
  - Use new SPI transfer delay structure.
* adis library
  - Add unlocked version of adis_initial_startup and refactor the function.
  - Add a product ID santiy check.
  - Add support for different self test registers.
  - Use new SPI delay structure.
  - Add new docs and tidy up existing.
* adis16136
  - Initialize adis_data statically.
* adis16400
  - Initialize adis_data statically.
* adis16460
  - Use core __adis_initial_Startup now it supports everything needed.
* adis16480
  - Initialize adis_data statically.
  - Use core __adis_initial_startup now it supports everything needed.
* al3320a
  - Add missing DT binding docs.
  - Tidy up code formatting.
  - Simplify error paths using devm_add_action_or_reset.
  - Ensure autoloading works by adding the of_match_table.
* atlas-sensor
  - Drop false requirement for interrupt line, the value can be polled using
    a sysfs or hrtimer type trigger.
* exynos-adc
  - Silence warning message on deferring probe.
* gp2ap002
  - Greatly simplify the Lux LUT.
  - Reorder actions around buffer setup and tear down as part of a sub-system
    wide standardization of these.
* inv_mpu6050
  - Various lttle tidyups.
  - Simpliy I2C aux MUX handling by enabling it only at startup. It never
    needs to be disabled.
  - Simplify polling rate when magnetometer enabled by putting only under
    control of userspace.
  - Always execute full reset on devices supporting spi. It does no harm
    when using i2c and makes for simpler code.
  - Reduce over the top sleep times for vddio regulator power up.
  - Greatly simplify power and engine management.
  - Fix some delays in polled reads (only visible due to other changes)
  - Stop preventing sampling rate changes whilst running as there is no
    adverse consequence of doing so.
  - Prevent attempting to read the temperature if neither accel nor
    gyro is enabled.
* lmp9100
  - Reorder actions around buffer setup and tear down as part of a sub-system
    wide standardization of these.
* max1118
  - Use new SPI transfer delay structure.
* mcp320x
  - Use new SPI transfer delay structure.
* si1133
  - Read full 24 bit signed integer instead o dropping last 8 bits of value.
    Not a critical fix as just adds precision.
* st_sensors
  - Use st_sensors_dev_name_probe instead of open coded version in st_accel
  - Handle potential memory allocation failure.
* st_lsm6dsx
  - Fix some wrong structure element naming in documentation.
  - Add missing return value check.
* stm32_timer_cnt
  - Drop some unused left over IIO headers from this count subsystem driver.
  - Ensure the clock is enabled in master mode.  Theoretical issue rather
    than one known to happen in the wild.
* tlc4541
  - Use new SPI delay structure.

* tag 'iio-5.7a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (98 commits)
  iio: dac: Kconfig: sort symbols alphabetically
  iio: light: gp2ap020a00f: fix iio_triggered_buffer_{predisable,postenable} positions
  iio: potentiostat: lmp9100: fix iio_triggered_buffer_{predisable,postenable} positions
  iio: trigger: stm32-timer: add power management support
  iio: trigger: stm32-timer: rename enabled flag
  iio: add a TODO
  counter: 104-quad-8: Support Differential Encoder Cable Status
  counter: 104-quad-8: Support Filter Clock Prescaler
  iio: pressure: icp10100: add driver for InvenSense ICP-101xx
  iio: industrialio-core: Fix debugfs read
  iio: imu: adis: add a note better explaining state_lock
  iio: imu: adis: update 'adis_data' struct doc-string
  iio: imu: adis: add doc-string for 'adis' struct
  iio: imu: adis_buffer: Use new structure for SPI transfer delays
  iio: adc: ti-tlc4541: Use new structure for SPI transfer delays
  iio: adc: mcp320x: Use new structure for SPI transfer delays
  iio: adc: max1118: Use new structure for SPI transfer delays
  iio: adc: ad9292: Use new structure for SPI transfer delays
  iio: adc: exynos: Silence warning about regulators during deferred probe
  staging: iio: update TODO
  ...

4 years agostaging: mt7621-pci: fix io space and properly set resource limits
Sergio Paracuellos [Wed, 18 Mar 2020 09:44:45 +0000 (10:44 +0100)]
staging: mt7621-pci: fix io space and properly set resource limits

Function 'mt7621_pci_parse_request_of_pci_ranges' is using
'of_pci_range_to_resource' to get both mem and io resources.
Internally this function calls to 'pci_address_to_pio' which
returns -1 if io space address is an address > IO_SPACE_LIMIT
which is 0xFFFF for mips. This mt7621 soc has io space in physical
address 0x1e160000. In order to fix this, overwrite invalid io
0xffffffff  with properly values from the device tree and set
mapped address of this resource as io port base memory address
calling 'set_io_port_base' function. There is also need to properly
setup resource limits and io and memory windows with properly
parsed values instead of set them as 'no limit' which it is wrong.
For any reason I don't really know legacy driver sets up mem window
as 0xFFFFFFFF and any other value seems to does not work as expected,
so set up also here with same values.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20200318094445.19669-1-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8192u: r8192U_wx: use netdev_warn() instead of printk()
Lourdes Pedrajas [Tue, 17 Mar 2020 16:59:17 +0000 (17:59 +0100)]
staging: rtl8192u: r8192U_wx: use netdev_warn() instead of printk()

printk() is deprecated, use netdev_warn() instead, which is a message printing
function specific for network devices.
Issue found by checkpatch.

Suggested-by: Julia Lawall <julia.lawall@inria.fr>
Suggested-by: Stefano Brivio <sbrivio@redhat.com>
Signed-off-by: Lourdes Pedrajas <lu@pplo.net>
Link: https://lore.kernel.org/r/20200317165917.6260-1-lu@pplo.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: media: hantro: remove parentheses
Kaaira Gupta [Fri, 13 Mar 2020 21:54:06 +0000 (03:24 +0530)]
staging: media: hantro: remove parentheses

Remove unnecessary parentheses in file hantro_postproc.c. Check reported
by coccinelle.

Signed-off-by: Kaaira Gupta <kgupta@es.iitr.ac.in>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Link: https://lore.kernel.org/r/20200313215406.2485-5-kgupta@es.iitr.ac.in
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: media: imx: remove parentheses
Kaaira Gupta [Fri, 13 Mar 2020 21:54:05 +0000 (03:24 +0530)]
staging: media: imx: remove parentheses

Remove unnecessary parentheses around a binary OR in file
imx7-mipi-csis.c. Check reported by coccinelle.

Signed-off-by: Kaaira Gupta <kgupta@es.iitr.ac.in>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Link: https://lore.kernel.org/r/20200313215406.2485-4-kgupta@es.iitr.ac.in
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: media: imx: remove temporary variable
Kaaira Gupta [Fri, 13 Mar 2020 21:54:04 +0000 (03:24 +0530)]
staging: media: imx: remove temporary variable

Remove unnecessary local variable `ret` in file `imx6-mipi-csi2.c` and
directly returning the value assigned to `ret.`

Signed-off-by: Kaaira Gupta <kgupta@es.iitr.ac.in>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Link: https://lore.kernel.org/r/20200313215406.2485-3-kgupta@es.iitr.ac.in
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: media: allegro: align with parenthesis
Kaaira Gupta [Fri, 13 Mar 2020 21:54:03 +0000 (03:24 +0530)]
staging: media: allegro: align with parenthesis

Align the lines of allegro-core.c with open parenthesis by giving proper
tabs and thereby fix checkpatch.pl warnings of matching alignment with
open parenthesis. Do it only for lines where character limit doesn't
exceed 80 characters.

Signed-off-by: Kaaira Gupta <kgupta@es.iitr.ac.in>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Link: https://lore.kernel.org/r/20200313215406.2485-2-kgupta@es.iitr.ac.in
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: media: imgu: Remove extra type detail
Deepak R Varma [Fri, 13 Mar 2020 18:27:58 +0000 (23:57 +0530)]
staging: media: imgu: Remove extra type detail

Remove unwanted variable type detail as detected by checkpatch script.

Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Link: https://lore.kernel.org/r/20200313182754.GA20501@deeUbuntu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wlan-ng: Fix line going over 80 characters
John B. Wyatt IV [Mon, 16 Mar 2020 22:15:44 +0000 (15:15 -0700)]
staging: wlan-ng: Fix line going over 80 characters

Add a newline before the second argument for style, readability, and
consistency.

Please note: checkpatch reports the third argument as being over 80
characters, but not the second argument.

Signed-off-by: John B. Wyatt IV <jbwyatt4@gmail.com>
Link: https://lore.kernel.org/r/20200316221544.1251350-1-jbwyatt4@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: speakup: main: switch multiple assignment for one assignment per line
Lourdes Pedrajas [Sun, 15 Mar 2020 22:12:47 +0000 (23:12 +0100)]
staging: speakup: main: switch multiple assignment for one assignment per line

One assignment per line is preferred, instead of multiple assignments.
To make it more readable.
Issue found with checkpatch.

Signed-off-by: Lourdes Pedrajas <lu@pplo.net>
Reviewed-by: Samuel Thibautl <samuel.thibault@ens-lyon.org>
Link: https://lore.kernel.org/r/20200315221247.16629-1-lu@pplo.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: mt7621-pci-phy: add 'mt7621_phy_rmw' to simplify code
Sergio Paracuellos [Sun, 15 Mar 2020 16:01:54 +0000 (17:01 +0100)]
staging: mt7621-pci-phy: add 'mt7621_phy_rmw' to simplify code

In order to simplify driver code and decrease a bit LOC add new
function 'mt7621_phy_rmw' where clear and set bits are passed as
arguments.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20200315160154.10292-1-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: qlge: qlge_ethtool.c: remove an unneeded variable
Payal Kshirsagar [Thu, 12 Mar 2020 19:06:24 +0000 (00:36 +0530)]
staging: qlge: qlge_ethtool.c: remove an unneeded variable

Remove unneeded temporary local variable, cleanup suggested by coccinelle.

Signed-off-by: Payal Kshirsagar <payalskshirsagar1234@gmail.com>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Link: https://lore.kernel.org/r/20200312190624.24167-5-payalskshirsagar1234@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: qlge: qlge_dbg.c: remove an unneeded variable
Payal Kshirsagar [Thu, 12 Mar 2020 19:06:23 +0000 (00:36 +0530)]
staging: qlge: qlge_dbg.c: remove an unneeded variable

Remove unneeded temporary local variable, cleanup suggested by coccinelle.

Signed-off-by: Payal Kshirsagar <payalskshirsagar1234@gmail.com>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Link: https://lore.kernel.org/r/20200312190624.24167-4-payalskshirsagar1234@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: qlge: qlge_mpi.c: remove an unneeded variable
Payal Kshirsagar [Thu, 12 Mar 2020 19:06:22 +0000 (00:36 +0530)]
staging: qlge: qlge_mpi.c: remove an unneeded variable

Remove unneeded temporary local variable, cleanup suggested by coccinelle.

Signed-off-by: Payal Kshirsagar <payalskshirsagar1234@gmail.com>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Link: https://lore.kernel.org/r/20200312190624.24167-3-payalskshirsagar1234@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: qlge: qlge_main.c: remove an unneeded variable
Payal Kshirsagar [Thu, 12 Mar 2020 19:06:21 +0000 (00:36 +0530)]
staging: qlge: qlge_main.c: remove an unneeded variable

Remove unneeded temporary local variable, cleanup suggested by coccinelle.

Signed-off-by: Payal Kshirsagar <payalskshirsagar1234@gmail.com>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Link: https://lore.kernel.org/r/20200312190624.24167-2-payalskshirsagar1234@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: qlge: qlge_main: remove unused code
Lourdes Pedrajas [Sat, 14 Mar 2020 23:46:08 +0000 (00:46 +0100)]
staging: qlge: qlge_main: remove unused code

Remove commented out lines. They are not used since 2009.

Signed-off-by: Lourdes Pedrajas <lu@pplo.net>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Link: https://lore.kernel.org/r/5511d6c142a8f045360af147528db8662f82787f.1584228792.git.lu@pplo.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: qlge: qlge_dbg: remove unneeded spaces
Lourdes Pedrajas [Sat, 14 Mar 2020 23:46:07 +0000 (00:46 +0100)]
staging: qlge: qlge_dbg: remove unneeded spaces

Remove spaces after type casting operators in order to comply codding
standards.
Issue found with checkpatch.

Signed-off-by: Lourdes Pedrajas <lu@pplo.net>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Link: https://lore.kernel.org/r/9a7c4bef601322c2c4d58d09b277a4a6ab82bd93.1584228792.git.lu@pplo.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wilc1000: rearrange line exceeding 80 characters
Gokce Kuler [Mon, 16 Mar 2020 15:10:09 +0000 (18:10 +0300)]
staging: wilc1000: rearrange line exceeding 80 characters

Moved to the bottom line after && operator for it exceeds 80 character

Signed-off-by: Gokce Kuler <gokcekuler@gmail.com>
Link: https://lore.kernel.org/r/20200316151009.GA7604@siyah2
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoStaging: wilc1000: cfg80211: Use kmemdup instead of kmalloc and memcpy
Shreeya Patel [Fri, 13 Mar 2020 11:24:51 +0000 (16:54 +0530)]
Staging: wilc1000: cfg80211: Use kmemdup instead of kmalloc and memcpy

Replace calls to kmalloc followed by a memcpy with a direct call to
kmemdup.

The Coccinelle semantic patch used to make this change is as follows:
@@
expression from,to,size,flag;
statement S;
@@

-  to = \(kmalloc\|kzalloc\)(size,flag);
+  to = kmemdup(from,size,flag);
   if (to==NULL || ...) S
-  memcpy(to, from, size);

Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Link: https://lore.kernel.org/r/20200313112451.25610-1-shreeya.patel23498@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: remove unneeded spaces
Lourdes Pedrajas [Sun, 15 Mar 2020 04:49:22 +0000 (05:49 +0100)]
staging: wfx: remove unneeded spaces

Remove spaces after type casting operators in order to comply codding
standards.
Issue found with checkpatch.

Signed-off-by: Lourdes Pedrajas <lu@pplo.net>
Link: https://lore.kernel.org/r/20200315044922.14249-1-lu@pplo.net
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: mt7621-pci: delete no more needed 'mt7621_reset_port'
Sergio Paracuellos [Fri, 13 Mar 2020 20:09:13 +0000 (21:09 +0100)]
staging: mt7621-pci: delete no more needed 'mt7621_reset_port'

After review all the resets at the beggining the function
'mt7621_reset_port' is not needed anymore. Hence delete it
and its uses.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20200313200913.24321-7-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: mt7621-pci: release gpios after pci initialization
Sergio Paracuellos [Fri, 13 Mar 2020 20:09:12 +0000 (21:09 +0100)]
staging: mt7621-pci: release gpios after pci initialization

R3G's LEDs fail to initialize because one of them uses GPIO8
Hence, release the GPIO resources after PCIe initialization
and properly release also in driver error path.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20200313200913.24321-6-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: mt7621-pci: bindings: update doc accordly to last changes
Sergio Paracuellos [Fri, 13 Mar 2020 20:09:11 +0000 (21:09 +0100)]
staging: mt7621-pci: bindings: update doc accordly to last changes

Properly update bindings documentation with added 'reset-gpios'
property. Delete also 'perst-gpio' which is not being used anymore.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20200313200913.24321-5-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: mt7621-dts: make use of 'reset-gpios' property for pci
Sergio Paracuellos [Fri, 13 Mar 2020 20:09:10 +0000 (21:09 +0100)]
staging: mt7621-dts: make use of 'reset-gpios' property for pci

Properly set pins for group pcie as 'gpio' function and declare
gpio's in the pci node to make reset stuff properly functional.
Delete no more needed general reset and previous pers gpio which
is now being used in 'reset-gpios' property.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20200313200913.24321-4-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: mt7621-pci: change value for 'PERST_DELAY_MS'
Sergio Paracuellos [Fri, 13 Mar 2020 20:09:09 +0000 (21:09 +0100)]
staging: mt7621-pci: change value for 'PERST_DELAY_MS'

Value of 'PERST_DELAY_MS' is too high and it is ok just
to set up to 100 ms. Update also define name from
'PERST_DELAY_US' into 'PERST_DELAY_MS'

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20200313200913.24321-3-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: mt7621-pci: use gpios for properly reset
Sergio Paracuellos [Fri, 13 Mar 2020 20:09:08 +0000 (21:09 +0100)]
staging: mt7621-pci: use gpios for properly reset

Original driver code was using three gpio's for reset
asserts and deasserts the pcis. Instead of using that
a general reset control with a perst gpio was introduced
and it seems it is partially working but sometimes there
are some unexpected hangs on boot. This commit make use of
the three original gpios using 'reset-gpios' property of
the device tree and removes the reset line and perst gpio.
According to the mediatek aplication note v0.1 there are
three gpios used for pcie ports reset control: gpio#19,
gpio#8 and gpio#7 for slots 0, 1 and 2 respectively.
This schema can be used separately for mt7621A but in some
boards due to pin share issue, if the PCM and I2S function
are enable at the same time, there are no enough GPIO to
control per-port PCIe reset. In those cases gpio#19 is enought
for reset the three ports together. Because of this we just
try to get the three gpios but if some of them fail we are not
failing in boot process, just prints a kernel notice and take
after into account if the descriptor is or not valid in order
to use it. All of them are set as GPIO output low configuration.
The gpio descriptor's API takes device tree property into account
and invert value if the pin is configured as active low.
So we also have to properly request pins from device tree
and set values correct in assert and deassert functions.
After this changes the order to make all assert and
deassert in the 'probe' process makes more sense:
* Parse device tree.
* make assert of the RC's and EP's before doing anything else.
* make deassert of the RC's before initializing the phy.
* Init the phy.
* make deassert of the EP's before initialize pci ports.
* Normal PCI initialization.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20200313200913.24321-2-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: bcm2835-camera: Use designators to init V4L2 controls
Stefan Wahren [Thu, 12 Mar 2020 21:37:39 +0000 (22:37 +0100)]
staging: bcm2835-camera: Use designators to init V4L2 controls

The initializer lists for the V4L2 controls are hard to read.
So improve this by using designators.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/1584049059-6772-3-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: bcm2835-camera: Drop unused ignore_errors flag
Stefan Wahren [Thu, 12 Mar 2020 21:37:38 +0000 (22:37 +0100)]
staging: bcm2835-camera: Drop unused ignore_errors flag

The struct bm2835_mmal_v4l2_ctrl contains an ignore_errors flag which
was always set to false. So drop the unused flag.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/1584049059-6772-2-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8192u: Corrects 'Avoid CamelCase' for variables
Camylla Goncalves Cantanheide [Tue, 17 Mar 2020 08:51:30 +0000 (08:51 +0000)]
staging: rtl8192u: Corrects 'Avoid CamelCase' for variables

The variables of function setKey triggered a 'Avoid CamelCase'
warning from checkpatch.pl. This patch renames these
variables to correct this warning.

Signed-off-by: Camylla Goncalves Cantanheide <c.cantanheide@gmail.com>
Link: https://lore.kernel.org/r/20200317085130.21213-2-c.cantanheide@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8192u: Using function name as string
Camylla Goncalves Cantanheide [Tue, 17 Mar 2020 08:51:29 +0000 (08:51 +0000)]
staging: rtl8192u: Using function name as string

Solves the following checkpatch.pl for a triggered function:
WARNING: Prefer using '"%s...", __func__' to using 'setKey',
this function's name, in a string

Signed-off-by: Camylla Goncalves Cantanheide <c.cantanheide@gmail.com>
Link: https://lore.kernel.org/r/20200317085130.21213-1-c.cantanheide@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8192u: Replaces symbolic permissions with octal permissions
Camylla Goncalves Cantanheide [Tue, 17 Mar 2020 07:19:59 +0000 (07:19 +0000)]
staging: rtl8192u: Replaces symbolic permissions with octal permissions

Solves following checkpatch.pl issue:
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider
using octal permissions '0444'.

Signed-off-by: Camylla Goncalves Cantanheide <c.cantanheide@gmail.com>
Link: https://lore.kernel.org/r/20200317071959.556-1-c.cantanheide@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: greybus: i2c: remove unused pointers
Lourdes Pedrajas [Thu, 12 Mar 2020 19:03:49 +0000 (20:03 +0100)]
staging: greybus: i2c: remove unused pointers

Remove unused pointers in gb_i2c_algorithm structure and gb_i2c_probe()
function, as they are not touched since 2014.

Suggested-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Lourdes Pedrajas <lu@pplo.net>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Link: https://lore.kernel.org/r/20200312190349.7892-1-lu@pplo.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: fbtft: Avoid potential precedence issues
Deepak R Varma [Sun, 15 Mar 2020 23:42:32 +0000 (05:12 +0530)]
staging: fbtft: Avoid potential precedence issues

Put parentheses around uses of macro parameters to avoid possible
precedence issues. Problem detected by checkpatch.

Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Link: https://lore.kernel.org/r/5c8520a5c3da453460608deee9a25232d52f4513.1584314604.git.mh12gx2825@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: fbtft: simplify array index computation
Deepak R Varma [Sun, 15 Mar 2020 23:42:08 +0000 (05:12 +0530)]
staging: fbtft: simplify array index computation

An array index is being computed by mathematical calculation on the
Lvalue side of the expression. This also further results in the statement
exceeding 80 character statement length.

A local variable can store the value of the array index computation. The
variable can then be used as array index. This improves readability of
the code and also address 80 character warning raised by checkpatch.

Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com>
Link: https://lore.kernel.org/r/4bf407e1b3e05745f767b2bad6218c9fb836d869.1584314604.git.mh12gx2825@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: fbtft: Reformat long macro definitions
Deepak R Varma [Sun, 15 Mar 2020 23:41:34 +0000 (05:11 +0530)]
staging: fbtft: Reformat long macro definitions

Multiple macro definitions crossing 80 character line length makes them
hard to understand. Reformatting the these lines makes the code more
readable and easier to understand. Issue flagged by checkpatch script.

Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com>
Link: https://lore.kernel.org/r/b8d2fc0f55339830694ee51860cc970ce1b9cae4.1584314604.git.mh12gx2825@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: fbtft: Reformat line over 80 characters
Deepak R Varma [Sun, 15 Mar 2020 23:41:06 +0000 (05:11 +0530)]
staging: fbtft: Reformat line over 80 characters

A long variable name beyond 80 characters extends  into the next
line. Reformatting the line makes it more readable. Also adding an extra
line for the next instruction following current if block helps
understand it better.

Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com>
Link: https://lore.kernel.org/r/027ccfa893feafc25da273b4b4de444d7a466cfd.1584314603.git.mh12gx2825@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoStaging: rtl8723bs: sdio_halinit: Remove unnecessary conditions
Shreeya Patel [Fri, 13 Mar 2020 10:49:20 +0000 (16:19 +0530)]
Staging: rtl8723bs: sdio_halinit: Remove unnecessary conditions

Remove if and else conditions since both are leading to the
initialization of "valueDMATimeout" and "valueDMAPageCount" with
the same value.

Found using coccinelle script.

Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20200313104920.19974-1-shreeya.patel23498@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoStaging: rtl8723bs: rtw_mlme: Remove unnecessary conditions
Shreeya Patel [Fri, 13 Mar 2020 10:29:12 +0000 (15:59 +0530)]
Staging: rtl8723bs: rtw_mlme: Remove unnecessary conditions

Remove unnecessary if and else conditions since both are leading to the
initialization of "phtpriv->ampdu_enable" with the same value.
Also, remove the unnecessary else-if condition since it does nothing.

Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Link: https://lore.kernel.org/r/20200313102912.17218-1-shreeya.patel23498@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: comedi: dt3000: Reformat multiple line dereference
Deepak R Varma [Sat, 14 Mar 2020 13:58:57 +0000 (19:28 +0530)]
staging: comedi: dt3000: Reformat multiple line dereference

Reformat multiple line dereferences for &cmd->scan_begin_arg. Problem
detected by checkpatch.

Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com>
Link: https://lore.kernel.org/r/20200314135852.GA6336@deeUbuntu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: comedi: ni_atmio16d: remove commented code blocks
Deepak R Varma [Sat, 14 Mar 2020 17:43:19 +0000 (23:13 +0530)]
staging: comedi: ni_atmio16d: remove commented code blocks

Remove two if# 0 directive code blocks. Problem detected by
checkpatch script.

Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com>
Link: https://lore.kernel.org/r/20200314174316.GA10615@deeUbuntu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: comedi: ni_mio_common: Code reformat and re-indentation
Deepak R Varma [Sat, 14 Mar 2020 21:07:53 +0000 (02:37 +0530)]
staging: comedi: ni_mio_common: Code reformat and re-indentation

Resolve general code indentation problems as detected by checkpatch script.
Implement code reformat and re-indentation as per coding style to
improve readability.

Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com>
Link: https://lore.kernel.org/r/20200314210749.GA3393@deeUbuntu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: comedi: s626: Reformat function arguments
Deepak R Varma [Sat, 14 Mar 2020 21:39:00 +0000 (03:09 +0530)]
staging: comedi: s626: Reformat function arguments

Reformat function call arguments to comedi_check_trigger_arg_min
as per coding style guideline. Problem detected by checkpatch script.

Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com>
Link: https://lore.kernel.org/r/20200314213856.GA3874@deeUbuntu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: comedi: rtd520: Resolve multiline dereference
Deepak R Varma [Sat, 14 Mar 2020 21:41:57 +0000 (03:11 +0530)]
staging: comedi: rtd520: Resolve multiline dereference

Reformat multi-line dereferencing of function arguments
&cmd->scan_begin_arg. Problem detected by checkpatch script.

Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com>
Link: https://lore.kernel.org/r/20200314214154.GA3904@deeUbuntu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: comedi: ni_tio: Reformat function call arguments
Deepak R Varma [Sat, 14 Mar 2020 21:42:57 +0000 (03:12 +0530)]
staging: comedi: ni_tio: Reformat function call arguments

Reformat function call arguments so that the function call is clearly
visible. Issue detected by checkpatch.

Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com>
Link: https://lore.kernel.org/r/20200314214254.GA3941@deeUbuntu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: vt6656: Use BIT_ULL() macro instead of bit shift operation
Oscar Carter [Sat, 14 Mar 2020 16:14:41 +0000 (17:14 +0100)]
staging: vt6656: Use BIT_ULL() macro instead of bit shift operation

Replace the bit left shift operation with the BIT_ULL() macro and remove
the unnecessary mask off operation against the bit_nr variable.

This mask is only there for legacy reasons. Originally it was 31 (0x1f)
and the bit_nr variable spread across an mc_filter array with two u32
elements. Now, this mask is not needed because its value is 0x3f and the
mc_filter variable is an u64 type.

In this situation, the 26 bit right shift operation against the value
returned by the ether_crc function set the bit_nr variable to the
following value:

bit 31 to bit 6 -> All 0 (due to the bit shift operation happens over an
unsigned type).

bit 5 to bit 0 -> The 6 msb bits of the value returned by the ether_crc
function.

The purpose of the 0x3f mask against the bit_nr variable is to reset
(set to 0) the 26 msb bits (bit 31 to bit 6), but these bits are yet 0.
So, the mask off operation is now unnecessary.

Signed-off-by: Oscar Carter <oscar.carter@gmx.com>
Link: https://lore.kernel.org/r/20200314161441.4870-1-oscar.carter@gmx.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8712: Fixes for simple typos in C comments
R Veera Kumar [Thu, 12 Mar 2020 09:10:48 +0000 (14:40 +0530)]
staging: rtl8712: Fixes for simple typos in C comments

Fixes for simple typos in C comments.
Found using checkpatch.pl.

Signed-off-by: R Veera Kumar <vkor@vkten.in>
Link: https://lore.kernel.org/r/20200312091042.GA4246@tulip.local
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoStaging: rtl8188eu: rtw_mlme: Add space around operators
Shreeya Patel [Wed, 11 Mar 2020 13:17:42 +0000 (18:47 +0530)]
Staging: rtl8188eu: rtw_mlme: Add space around operators

Add space around operators for improving the code
readability.
Reported by checkpatch.pl

git diff -w shows no difference.
diff of the .o files before and after the changes shows no difference.

Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Link: https://lore.kernel.org/r/20200311131742.31068-1-shreeya.patel23498@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8723bs: Use scnprintf() for avoiding potential buffer overflow
Takashi Iwai [Wed, 11 Mar 2020 09:24:51 +0000 (10:24 +0100)]
staging: rtl8723bs: Use scnprintf() for avoiding potential buffer overflow

Since snprintf() returns the would-be-output size instead of the
actual output size, the succeeding calls may go beyond the given
buffer limit.  Fix it by replacing with scnprintf().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20200311092451.23933-4-tiwai@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8192e: Use scnprintf() for avoiding potential buffer overflow
Takashi Iwai [Wed, 11 Mar 2020 09:24:50 +0000 (10:24 +0100)]
staging: rtl8192e: Use scnprintf() for avoiding potential buffer overflow

Since snprintf() returns the would-be-output size instead of the
actual output size, the succeeding calls may go beyond the given
buffer limit.  Fix it by replacing with scnprintf().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20200311092451.23933-3-tiwai@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8188eu: Use scnprintf() for avoiding potential buffer overflow
Takashi Iwai [Wed, 11 Mar 2020 09:24:49 +0000 (10:24 +0100)]
staging: rtl8188eu: Use scnprintf() for avoiding potential buffer overflow

Since snprintf() returns the would-be-output size instead of the
actual output size, the succeeding calls may go beyond the given
buffer limit.  Fix it by replacing with scnprintf().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20200311092451.23933-2-tiwai@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: most: core: Use scnprintf() for avoiding potential buffer overflow
Takashi Iwai [Wed, 11 Mar 2020 09:19:44 +0000 (10:19 +0100)]
staging: most: core: Use scnprintf() for avoiding potential buffer overflow

Since snprintf() returns the would-be-output size instead of the
actual output size, the succeeding calls may go beyond the given
buffer limit.  Fix it by replacing with scnprintf().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20200311091944.23185-1-tiwai@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wilc1000: updated DT binding documentation
Ajay Singh [Sat, 7 Mar 2020 08:55:32 +0000 (08:55 +0000)]
staging: wilc1000: updated DT binding documentation

Merged the DT binding documentation of SDIO and SPI into a single file.
Removed documentation for some of the properties which are not required
and handled review comments received in [1] & [2].

[1]. https://lore.kernel.org/linux-wireless/20200303020230.GA15543@bogus
[2]. https://lore.kernel.org/linux-wireless/20200303015558.GA6876@bogus

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Link: https://lore.kernel.org/r/20200307085523.7320-4-ajay.kathat@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wilc1000: modified 'clock-names' and 'compatible' property
Ajay Singh [Sat, 7 Mar 2020 08:55:29 +0000 (08:55 +0000)]
staging: wilc1000: modified 'clock-names' and 'compatible' property

Modified the 'clock-names' property by removing '_clk' from its name and
remove '_spi/sdio' from 'compatible' string.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Link: https://lore.kernel.org/r/20200307085523.7320-3-ajay.kathat@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wilc1000: use 'interrupts' property instead of 'irq-gpio'
Ajay Singh [Sat, 7 Mar 2020 08:55:28 +0000 (08:55 +0000)]
staging: wilc1000: use 'interrupts' property instead of 'irq-gpio'

Make use of 'interrupts' property instead of using gpio for handling
the interrupt as suggested in [1].

[1]. https://lore.kernel.org/linux-wireless/20200303015558.GA6876@bogus

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Link: https://lore.kernel.org/r/20200307085523.7320-2-ajay.kathat@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: qlge: Fix WARNING: Missing a blank line after declarations
Carlos Henrique Lima Melara [Wed, 11 Mar 2020 01:27:20 +0000 (01:27 +0000)]
staging: qlge: Fix WARNING: Missing a blank line after declarations

Fixed WARNING: Missing a blank line after declarations in qlge_mpi.c to
the following lines:

WARNING: Missing a blank line after declarations
FILE: drivers/staging/qlge/qlge_mpi.c:94:

WARNING: Missing a blank line after declarations
FILE: drivers/staging/qlge/qlge_mpi.c:240:

WARNING: Missing a blank line after declarations
FILE: drivers/staging/qlge/qlge_mpi.c:258:

WARNING: Missing a blank line after declarations
FILE: drivers/staging/qlge/qlge_mpi.c:356:

WARNING: Missing a blank line after declarations
FILE: drivers/staging/qlge/qlge_mpi.c:915:

WARNING: Missing a blank line after declarations
FILE: drivers/staging/qlge/qlge_mpi.c:1099:

Signed-off-by: Carlos Henrique Lima Melara <charlesmelara@outlook.com>
Link: https://lore.kernel.org/r/CP2PR80MB434086A44A1ED5BB662B9D70A8FC0@CP2PR80MB4340.lamprd80.prod.outlook.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: rtl8188eu: fix typo s/informations/information
Andre Pinto [Wed, 11 Mar 2020 01:26:38 +0000 (01:26 +0000)]
staging: rtl8188eu: fix typo s/informations/information

Fix checkpatch check: 'informations' may be misspelled - perhaps
'information'? in rtw_mlme_ext.c:1151.

Signed-off-by: Andre Pinto <andrealmeidap1996@gmail.com>
Link: https://lore.kernel.org/r/20200311012638.18889-1-andrealmeidap1996@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: vt6655: power.c: code reformatting for improved readability
Lourdes Pedrajas [Tue, 10 Mar 2020 14:09:08 +0000 (15:09 +0100)]
staging: vt6655: power.c: code reformatting for improved readability

Improve line grouping for better understanding the course of action and where
every comment belongs to.

Signed-off-by: Lourdes Pedrajas <lu@pplo.net>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Link: https://lore.kernel.org/r/3fada7fe76047ecf06d0345c0ab9216424a126f2.1583848946.git.lu@pplo.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: vt6655: power.c: Remove setting ATIM Window in PSvEnablePowerSaving()
Lourdes Pedrajas [Tue, 10 Mar 2020 14:09:07 +0000 (15:09 +0100)]
staging: vt6655: power.c: Remove setting ATIM Window in PSvEnablePowerSaving()

Every time priv->op_mode is not NL80211_IFTYPE_ADHOC it sets ATIM Window, but
this feature it is marked TODO in 2014 and did go untouched since 2015.

Signed-off-by: Lourdes Pedrajas <lu@pplo.net>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Link: https://lore.kernel.org/r/d9b8e434e09cb8885026a71441bf3a6919dba3da.1583848946.git.lu@pplo.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: mt7621-pci: enable clock bit for each port
Sergio Paracuellos [Tue, 10 Mar 2020 11:34:59 +0000 (12:34 +0100)]
staging: mt7621-pci: enable clock bit for each port

The clock related code concerns me from the very beginning because
there are some set ups got from legacy driver that are not documented
anywhere. According to the programming guide 0x7c is 'CPE_ROSC_SEL1'
register and 0x80 is 'CPU_CPE_CN'. I do think this set up is not needed
at all and the proper thing to do is just enable the clock bit for each
pcie port. Hence remove useless code and do the right thing which is
setting up the clock bit for each port enabled.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20200310113459.30539-1-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: comedi: dt282x: remove old unused code
Deepak R Varma [Tue, 10 Mar 2020 21:25:48 +0000 (02:55 +0530)]
staging: comedi: dt282x: remove old unused code

There are two #if 0 blocks that have no recent history of any change.
Remove those code blocks for improved readability of the code.

Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com>
Link: https://lore.kernel.org/r/20200310212545.GA8914@deeUbuntu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: remove unused structure
Kaaira Gupta [Tue, 10 Mar 2020 14:25:09 +0000 (19:55 +0530)]
staging: wfx: remove unused structure

struct hif_cnf_reset is not used anywhere in wfx. It's parent file
hif_api_cmd.h is imported form some other driver, hence some functions
in it are not used. This is one of them. Hence remove it.

Signed-off-by: Kaaira Gupta <kgupta@es.iitr.ac.in>
Link: https://lore.kernel.org/r/20200310142509.25632-7-kgupta@es.iitr.ac.in
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: remove variable declaration
Kaaira Gupta [Tue, 10 Mar 2020 14:25:08 +0000 (19:55 +0530)]
staging: wfx: remove variable declaration

int ret is uneccessarily declared and 0 assigned to it. Return o
directly instead.

Signed-off-by: Kaaira Gupta <kgupta@es.iitr.ac.in>
Link: https://lore.kernel.org/r/20200310142509.25632-6-kgupta@es.iitr.ac.in
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: data_tx.h: remove space after cast
Kaaira Gupta [Tue, 10 Mar 2020 14:25:07 +0000 (19:55 +0530)]
staging: wfx: data_tx.h: remove space after cast

remove extra space after a cast in file data_tx.h

Signed-off-by: Kaaira Gupta <kgupta@es.iitr.ac.in>
Link: https://lore.kernel.org/r/20200310142509.25632-5-kgupta@es.iitr.ac.in
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: dat_tx.c: remove space after a cast
Kaaira Gupta [Tue, 10 Mar 2020 14:25:06 +0000 (19:55 +0530)]
staging: wfx: dat_tx.c: remove space after a cast

remove extra spaces after casts in file data_tx.c

Signed-off-by: Kaaira Gupta <kgupta@es.iitr.ac.in>
Link: https://lore.kernel.org/r/20200310142509.25632-4-kgupta@es.iitr.ac.in
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: change 1 to bool
Kaaira Gupta [Tue, 10 Mar 2020 14:25:05 +0000 (19:55 +0530)]
staging: wfx: change 1 to bool

policies[i].uploaded is a bool. 1 is assigned to it. Change it to bool.

Signed-off-by: Kaaira Gupta <kgupta@es.iitr.ac.in>
Link: https://lore.kernel.org/r/20200310142509.25632-3-kgupta@es.iitr.ac.in
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: data_rx.c: remove space after cast
Kaaira Gupta [Tue, 10 Mar 2020 14:25:04 +0000 (19:55 +0530)]
staging: wfx: data_rx.c: remove space after cast

remove an unesseccary space after a cast in file data_rx.c

Signed-off-by: Kaaira Gupta <kgupta@es.iitr.ac.in>
Link: https://lore.kernel.org/r/20200310142509.25632-2-kgupta@es.iitr.ac.in
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: exfat: remove staging version of exfat filesystem
Greg Kroah-Hartman [Tue, 10 Mar 2020 10:54:21 +0000 (11:54 +0100)]
staging: exfat: remove staging version of exfat filesystem

Now that there is a "real" solution for exfat in the vfs tree queued up
to be merged in 5.7-rc1 the "old" exfat code in staging can be removed.

Many thanks to Valdis for doing the work to get this into the tree in
the first place, it was greatly appreciated.

Acked-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>
Cc: Pali Rohár <pali@kernel.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Namjae Jeon <namjae.jeon@samsung.com>
Cc: Sungjong Seo <sj1557.seo@samsung.com>
Cc: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20200310105421.GA2810679@kroah.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: mt7621-pci: simplify 'mt7621_pcie_init_virtual_bridges' function
Sergio Paracuellos [Sun, 8 Mar 2020 09:19:27 +0000 (10:19 +0100)]
staging: mt7621-pci: simplify 'mt7621_pcie_init_virtual_bridges' function

Function 'mt7621_pcie_init_virtual_bridges' is a bit mess and can be
refactorized properly in a cleaner way. Introduce new 'pcie_rmw' inline
function helper to do clear and set the correct bits this function needs
to work.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20200308091928.17177-1-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: speakup: Fix a typo error print for softsynthu device
Zhenzhong Duan [Thu, 5 Mar 2020 07:21:51 +0000 (15:21 +0800)]
staging: speakup: Fix a typo error print for softsynthu device

When softsynthu device fails the register, "/dev/softsynthu" should be
printed instead of "/dev/softsynth".

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@gmail.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Cc: William Hubbs <w.d.hubbs@gmail.com>
Cc: Chris Brannon <chris@the-brannons.com>
Cc: Kirk Reiser <kirk@reisers.ca>
Link: https://lore.kernel.org/r/20200305072151.403-1-zhenzhong.duan@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: vt6656: struct vnt_rcb remove unused in_use.
Malcolm Priestley [Wed, 4 Mar 2020 19:46:02 +0000 (19:46 +0000)]
staging: vt6656: struct vnt_rcb remove unused in_use.

The variable merely toggles true to false and is unused.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Link: https://lore.kernel.org/r/130a4078-2502-a381-46c4-b473815e153b@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: vt6656: Remove vnt_interrupt_buffer in_use flag.
Malcolm Priestley [Wed, 4 Mar 2020 19:41:55 +0000 (19:41 +0000)]
staging: vt6656: Remove vnt_interrupt_buffer in_use flag.

mac80211 is the only user of in_use to start it and should
not be true when so.

So internal toggling of this variable is not relevant.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Link: https://lore.kernel.org/r/69585034-4318-4bec-7d9b-f64a167df237@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wilc1000: spi: Use new structure for SPI transfer delays
Sergiu Cuciurean [Wed, 4 Mar 2020 07:43:19 +0000 (09:43 +0200)]
staging: wilc1000: spi: Use new structure for SPI transfer delays

In a recent change to the SPI subsystem in commit <bebcfd272df6>
("spi: introduce `delay` field for `spi_transfer` +
spi_transfer_delay_exec()"), a new `delay` struct was added
to replace the `delay_usecs`. This change replaces the current
`delay_usecs` with `delay` for this driver.

The `spi_transfer_delay_exec()` function [in the SPI framework] makes sure
that both `delay_usecs` & `delay` are used (in this order to preserve
backwards compatibility).

Signed-off-by: Sergiu Cuciurean <sergiu.cuciurean@analog.com>
Link: https://lore.kernel.org/r/20200304074319.22107-1-sergiu.cuciurean@analog.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: kpc2000: kpc2000_spi: Use new structure for SPI transfer delays
Sergiu Cuciurean [Wed, 4 Mar 2020 07:37:46 +0000 (09:37 +0200)]
staging: kpc2000: kpc2000_spi: Use new structure for SPI transfer delays

In a recent change to the SPI subsystem in commit <bebcfd272df6>
("spi: introduce `delay` field for `spi_transfer` +
spi_transfer_delay_exec()"), a new `delay` struct was added
to replace the `delay_usecs`. This change replaces the current
`delay_usecs` with `delay` for this driver.

The `spi_transfer_delay_exec()` function [in the SPI framework] makes sure
that both `delay_usecs` & `delay` are used (in this order to preserve
backwards compatibility).

Signed-off-by: Sergiu Cuciurean <sergiu.cuciurean@analog.com>
Link: https://lore.kernel.org/r/20200304073746.19664-1-sergiu.cuciurean@analog.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoStaging: rtl8188eu: Add space around operator
Shreeya Patel [Sun, 8 Mar 2020 19:21:52 +0000 (00:51 +0530)]
Staging: rtl8188eu: Add space around operator

Add space around & operator for improving the code
readability.

Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com>
Acked-by: Julia Lawall <julia.lawall@inria.fr>
Link: https://lore.kernel.org/r/20200308192152.26403-1-shreeya.patel23498@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: hp: remove commented out code
Lourdes Pedrajas [Sun, 8 Mar 2020 22:54:00 +0000 (23:54 +0100)]
staging: hp: remove commented out code

Remove unused code.

Signed-off-by: Lourdes Pedrajas <lu@pplo.net>
Link: https://lore.kernel.org/r/20200308225400.17267-1-lu@pplo.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: exfat: alignment should match open parenthesis
Payal Kshirsagar [Mon, 9 Mar 2020 16:51:38 +0000 (22:21 +0530)]
staging: exfat: alignment should match open parenthesis

Align code to match open parenthesis.

Signed-off-by: Payal Kshirsagar <payalskshirsagar1234@gmail.com>
Link: https://lore.kernel.org/r/20200309165138.5313-1-payalskshirsagar1234@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: exfat: exfat_super.c: remove commented out function
Lourdes Pedrajas [Mon, 9 Mar 2020 16:58:01 +0000 (17:58 +0100)]
staging: exfat: exfat_super.c: remove commented out function

Remove function ffsSetAttr() which is unused.

Signed-off-by: Lourdes Pedrajas <lu@pplo.net>
Link: https://lore.kernel.org/r/20200309165801.4827-1-lu@pplo.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoStaging: rtl8723bs: Remove comparison to true
Shreeya Patel [Sun, 8 Mar 2020 20:17:03 +0000 (01:47 +0530)]
Staging: rtl8723bs: Remove comparison to true

Remove comparison to "true" from if statement to
maintain the kernel coding style.

Reported by checkpatch.pl

Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com>
Link: https://lore.kernel.org/r/20200308201703.31709-1-shreeya.patel23498@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: ks7010: remove line over 80 characters
Payal Kshirsagar [Sun, 8 Mar 2020 12:38:34 +0000 (18:08 +0530)]
staging: ks7010: remove line over 80 characters

Remove line over 80 characters.

Signed-off-by: Payal Kshirsagar <payalskshirsagar1234@gmail.com>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Link: https://lore.kernel.org/r/20200308123834.3377-1-payalskshirsagar1234@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: remove blank line
Payal Kshirsagar [Mon, 9 Mar 2020 16:55:28 +0000 (22:25 +0530)]
staging: wfx: remove blank line

Blank line is not necessary before a close brace '}', remove it.

Signed-off-by: Payal Kshirsagar <payalskshirsagar1234@gmail.com>
Reviewed-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200309165528.5721-1-payalskshirsagar1234@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: wfx: alignment should match open parenthesis
Payal Kshirsagar [Mon, 9 Mar 2020 16:45:15 +0000 (22:15 +0530)]
staging: wfx: alignment should match open parenthesis

Align code to open parenthesis.

Signed-off-by: Payal Kshirsagar <payalskshirsagar1234@gmail.com>
Link: https://lore.kernel.org/r/20200309164515.4880-1-payalskshirsagar1234@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: greybus: Fix the irq API abuse
Thomas Gleixner [Fri, 6 Mar 2020 13:24:13 +0000 (14:24 +0100)]
staging: greybus: Fix the irq API abuse

Nothing outside of low level architecture code is supposed to look up
interrupt descriptors and fiddle with them.

Replace the open coded abuse by calling generic_handle_irq().

This still does not explain why and in which context this connection
magic is injecting interrupts in the first place and why this is correct
and safe, but at least the API abuse is gone.

Fixes: 036aad9d0224 ("greybus: gpio: add interrupt handling support")
Fixes: 2611ebef8322 ("greybus: gpio: don't call irq-flow handler directly")
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/87o8t9boqq.fsf@nanos.tec.linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: greybus: i2c.c: remove commented out function
Lourdes Pedrajas [Mon, 9 Mar 2020 17:06:43 +0000 (18:06 +0100)]
staging: greybus: i2c.c: remove commented out function

Remove function gb_i2c_smbus_xfer() which is unused.

Signed-off-by: Lourdes Pedrajas <lu@pplo.net>
Link: https://lore.kernel.org/r/20200309170643.4947-1-lu@pplo.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: qlge: qlge.h: remove excess newlines
Payal Kshirsagar [Mon, 9 Mar 2020 16:27:28 +0000 (21:57 +0530)]
staging: qlge: qlge.h: remove excess newlines

Blank lines aren't necessary after an open brace '{'.

Signed-off-by: Payal Kshirsagar <payalskshirsagar1234@gmail.com>
Link: https://lore.kernel.org/r/20200309162728.4342-4-payalskshirsagar1234@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: qlge: qlge.h: add spaces around operators
Payal Kshirsagar [Mon, 9 Mar 2020 16:27:27 +0000 (21:57 +0530)]
staging: qlge: qlge.h: add spaces around operators

Add spaces around operators cleanup reported by checkpatch.

Signed-off-by: Payal Kshirsagar <payalskshirsagar1234@gmail.com>
Link: https://lore.kernel.org/r/20200309162728.4342-3-payalskshirsagar1234@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: qlge: qlge.h: remove spaces before tabs and align code
Payal Kshirsagar [Mon, 9 Mar 2020 16:27:26 +0000 (21:57 +0530)]
staging: qlge: qlge.h: remove spaces before tabs and align code

Remove white spaces before tabs and align code properly for readability.

Signed-off-by: Payal Kshirsagar <payalskshirsagar1234@gmail.com>
Link: https://lore.kernel.org/r/20200309162728.4342-2-payalskshirsagar1234@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: qlge: remove blank line
Payal Kshirsagar [Mon, 9 Mar 2020 09:40:36 +0000 (15:10 +0530)]
staging: qlge: remove blank line

Remove unnecessary multiple blank lines.

Signed-off-by: Payal Kshirsagar <payalskshirsagar1234@gmail.com>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Link: https://lore.kernel.org/r/20200309094036.3957-1-payalskshirsagar1234@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: vt6655: alignment should match open parenthesis
Payal Kshirsagar [Mon, 9 Mar 2020 17:09:27 +0000 (22:39 +0530)]
staging: vt6655: alignment should match open parenthesis

Align code to the open parenthesis to fix the alignment issue.

Signed-off-by: Payal Kshirsagar <payalskshirsagar1234@gmail.com>
Link: https://lore.kernel.org/r/20200309170927.6171-1-payalskshirsagar1234@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agostaging: vt6656: remove blank line
Payal Kshirsagar [Mon, 9 Mar 2020 07:34:24 +0000 (13:04 +0530)]
staging: vt6656: remove blank line

To avoid style issues, remove multiple blank lines.

Signed-off-by: Payal Kshirsagar <payalskshirsagar1234@gmail.com>
Acked-by: Julia Lawall <julia.lawall@inria.fr>
Link: https://lore.kernel.org/r/20200309073424.4920-1-payalskshirsagar1234@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoiio: dac: Kconfig: sort symbols alphabetically
Alexandru Ardelean [Wed, 4 Mar 2020 13:55:44 +0000 (15:55 +0200)]
iio: dac: Kconfig: sort symbols alphabetically

While adding a new device, I noticed these aren't sorted alphabetically [as
in the Makefile], which messed my head-up.
This change sorts the devices alphabetically in the drivers/iio/dac/Kconfig
file as well.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
4 years agoiio: light: gp2ap020a00f: fix iio_triggered_buffer_{predisable,postenable} positions
Alexandru Ardelean [Fri, 6 Mar 2020 11:11:37 +0000 (13:11 +0200)]
iio: light: gp2ap020a00f: fix iio_triggered_buffer_{predisable,postenable} positions

The iio_triggered_buffer_{predisable,postenable} functions attach/detach
the poll functions.

For the predisable hook, the disable code should occur before detaching
the poll func, and for the postenable hook, the poll func should be
attached before the enable code.

This change moves the postenable/predisable hooks into the correct
positions.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
4 years agoiio: potentiostat: lmp9100: fix iio_triggered_buffer_{predisable,postenable} positions
Alexandru Ardelean [Wed, 4 Mar 2020 09:41:05 +0000 (11:41 +0200)]
iio: potentiostat: lmp9100: fix iio_triggered_buffer_{predisable,postenable} positions

The iio_triggered_buffer_{predisable,postenable} functions attach/detach
the poll functions.

For the predisable hook, the disable code should occur before detaching
the poll func, and for the postenable hook, the poll func should be
attached before the enable code.

The lmp9100 was attaching a poll function but never detaching it via any
IIO disable hook.

This change adds the detaching of the poll function, and moves/renames
lmp91000_buffer_preenable() function to lmp91000_buffer_postenable().
The idea is to make it more symmetrical, so that when the
iio_triggered_buffer_{predisable,postenable} functions get removed, it's
easier to see.

Fixes: 67e17300dc1d7 ("iio: potentiostat: add LMP91000 support")
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>