mbox series

[v1,00/22] iio: use dev_get_platdata() to access platform_data

Message ID 20240902222824.1145571-1-andy.shevchenko@gmail.com (mailing list archive)
Headers show
Series iio: use dev_get_platdata() to access platform_data | expand

Message

Andy Shevchenko Sept. 2, 2024, 10:16 p.m. UTC
Unify how IIO drivers access platform_data field of struct device.
In simple and straightforward cases constify the local variables.

(Not tested)

Andy Shevchenko (22):
  iio: accel: hid-sensor-accel-3d: Get platform data via
    dev_get_platdata()
  iio: adc: ad7266: Get platform data via dev_get_platdata()
  iio: adc: ad7791: Get platform data via dev_get_platdata()
  iio: adc: ad7887: Get platform data via dev_get_platdata()
  iio: adc: ad7793: Get platform data via dev_get_platdata()
  iio: adc: ltc2497: Get platform data via dev_get_platdata()
  iio: dac: ad5504: Get platform data via dev_get_platdata()
  iio: dac: ad5791: Get platform data via dev_get_platdata()
  iio: dac: m62332: Get platform data via dev_get_platdata()
  iio: dac: max517: Get platform data via dev_get_platdata()
  iio: frequency: ad9523: Get platform data via dev_get_platdata()
  iio: frequency: adf4350: Get platform data via dev_get_platdata()
  iio: gyro: hid-sensor-gyro-3d: Get platform data via
    dev_get_platdata()
  iio: imu: st_lsm6dsx: Get platform data via dev_get_platdata()
  iio: light: hid-sensor-als: Get platform data via dev_get_platdata()
  iio: light: hid-sensor-prox: Get platform data via dev_get_platdata()
  iio: light: lm3533-als: Get platform data via dev_get_platdata()
  iio: magnetometer: hid-sensor-magn-3d: Get platform data via
    dev_get_platdata()
  iio: orientation: hid-sensor-incl-3d: Get platform data via
    dev_get_platdata()
  iio: orientation: hid-sensor-rotation: Get platform data via
    dev_get_platdata()
  iio: position: hid-sensor-custom-intel-hinge: Get platform data via
    dev_get_platdata()
  iio: pressure: hid-sensor-press: Get platform data via
    dev_get_platdata()

 drivers/iio/accel/hid-sensor-accel-3d.c           |  5 ++---
 drivers/iio/adc/ad7266.c                          |  2 +-
 drivers/iio/adc/ad7791.c                          |  4 ++--
 drivers/iio/adc/ad7793.c                          |  2 +-
 drivers/iio/adc/ad7887.c                          |  2 +-
 drivers/iio/adc/ltc2497-core.c                    | 15 +++++----------
 drivers/iio/dac/ad5504.c                          |  2 +-
 drivers/iio/dac/ad5791.c                          |  2 +-
 drivers/iio/dac/m62332.c                          |  2 +-
 drivers/iio/dac/max517.c                          |  4 ++--
 drivers/iio/frequency/ad9523.c                    |  2 +-
 drivers/iio/frequency/adf4350.c                   |  2 +-
 drivers/iio/gyro/hid-sensor-gyro-3d.c             |  4 ++--
 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c      | 15 +++++----------
 drivers/iio/light/hid-sensor-als.c                |  4 ++--
 drivers/iio/light/hid-sensor-prox.c               |  4 ++--
 drivers/iio/light/lm3533-als.c                    |  6 +++---
 drivers/iio/magnetometer/hid-sensor-magn-3d.c     |  4 ++--
 drivers/iio/orientation/hid-sensor-incl-3d.c      |  4 ++--
 drivers/iio/orientation/hid-sensor-rotation.c     |  4 ++--
 .../iio/position/hid-sensor-custom-intel-hinge.c  |  4 ++--
 drivers/iio/pressure/hid-sensor-press.c           |  4 ++--
 22 files changed, 43 insertions(+), 54 deletions(-)

Comments

Andy Shevchenko Sept. 3, 2024, 5:57 p.m. UTC | #1
On Tue, Sep 03, 2024 at 01:16:45AM +0300, Andy Shevchenko wrote:
> Unify how IIO drivers access platform_data field of struct device.
> In simple and straightforward cases constify the local variables.
> 
> (Not tested)

Jonathan, in case you are fine with the series, feel free to squash, e.g.,
changes against hid-sensor drivers.
Jonathan Cameron Sept. 7, 2024, 3:42 p.m. UTC | #2
On Tue, 3 Sep 2024 20:57:27 +0300
Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:

> On Tue, Sep 03, 2024 at 01:16:45AM +0300, Andy Shevchenko wrote:
> > Unify how IIO drivers access platform_data field of struct device.
> > In simple and straightforward cases constify the local variables.
> > 
> > (Not tested)  
> 
> Jonathan, in case you are fine with the series, feel free to squash, e.g.,
> changes against hid-sensor drivers.
I don't follow, but maybe that will become clear once I've looked
at rest of the stuff I haven't read yet.

Anyhow, applied to the togreg branch of iio.git and pushed out as testing
for all the normal reasons.  Another series that will probably be 6.13 material.

Thanks,

Jonathan
>
Andy Shevchenko Sept. 9, 2024, 9:17 a.m. UTC | #3
On Sat, Sep 07, 2024 at 04:42:58PM +0100, Jonathan Cameron wrote:
> On Tue, 3 Sep 2024 20:57:27 +0300
> Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
> > On Tue, Sep 03, 2024 at 01:16:45AM +0300, Andy Shevchenko wrote:
> > > Unify how IIO drivers access platform_data field of struct device.
> > > In simple and straightforward cases constify the local variables.
> > > 
> > > (Not tested)  
> > 
> > Jonathan, in case you are fine with the series, feel free to squash, e.g.,
> > changes against hid-sensor drivers.
> I don't follow, but maybe that will become clear once I've looked
> at rest of the stuff I haven't read yet.

I mean all the patches that starts with "iio: *: hid-sensor-*:" can be squashed
into one with "iio: hid-sensor:"

> Anyhow, applied to the togreg branch of iio.git and pushed out as testing
> for all the normal reasons.  Another series that will probably be 6.13 material.

Thank you!