Linux IIO development
 help / color / mirror / Atom feed
* [PATCH 0/8] IIO: Drop incorrect includes of linux/of.h
@ 2024-02-18 17:33 Jonathan Cameron
  2024-02-18 17:33 ` [PATCH 1/8] iio: light: vl6180: Drop unused linux/of.h include Jonathan Cameron
                   ` (9 more replies)
  0 siblings, 10 replies; 12+ messages in thread
From: Jonathan Cameron @ 2024-02-18 17:33 UTC (permalink / raw)
  To: linux-iio, Andy Shevchenko; +Cc: Jonathan Cameron

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

These were false positives when I was looking at which drivers
should be converted over to fwnode based handling from
linux/property.h

None of them use anything defined in linux/of.h, so drop the include
and include more specific headers (mostly linux/mod_devicetable.h)
instead.

Jonathan Cameron (8):
  iio: light: vl6180: Drop unused linux/of.h include
  iio: light: al3320a: Drop unused linux/of.h include
  iio: light: al3010: Switch from linux/of.h to linux/mod_devicetable.h
  iio: adc: ads8688: Switch to mod_devicetable.h for struct of_device_id
    definition
  iio: accel: adxl372: Switch from linux/of.h to linux/mod_devicetable.h
  iio: accel: bma180: Switch from linux/of.h to linux/mod_devicetable.h
  iio: accel: kxsd9: Switch from linux/of.h to linux/mod_devicetable.h
  iio: dac: mcp4821: Switch to including mod_devicetable.h for struct
    of_device_id definition.

 drivers/iio/accel/adxl372_spi.c | 2 +-
 drivers/iio/accel/bma180.c      | 2 +-
 drivers/iio/accel/kxsd9-spi.c   | 2 +-
 drivers/iio/adc/ti-ads8688.c    | 2 +-
 drivers/iio/dac/mcp4821.c       | 2 +-
 drivers/iio/light/al3010.c      | 2 +-
 drivers/iio/light/al3320a.c     | 1 -
 drivers/iio/light/vl6180.c      | 1 -
 8 files changed, 6 insertions(+), 8 deletions(-)

-- 
2.43.2


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 1/8] iio: light: vl6180: Drop unused linux/of.h include
  2024-02-18 17:33 [PATCH 0/8] IIO: Drop incorrect includes of linux/of.h Jonathan Cameron
@ 2024-02-18 17:33 ` Jonathan Cameron
  2024-02-18 17:33 ` [PATCH 2/8] iio: light: al3320a: " Jonathan Cameron
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Jonathan Cameron @ 2024-02-18 17:33 UTC (permalink / raw)
  To: linux-iio, Andy Shevchenko; +Cc: Jonathan Cameron

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Nothing from linux/of.h is used in this driver.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
 drivers/iio/light/vl6180.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/iio/light/vl6180.c b/drivers/iio/light/vl6180.c
index d4948dfc31ff..dcadf6428a87 100644
--- a/drivers/iio/light/vl6180.c
+++ b/drivers/iio/light/vl6180.c
@@ -20,7 +20,6 @@
 #include <linux/i2c.h>
 #include <linux/mutex.h>
 #include <linux/err.h>
-#include <linux/of.h>
 #include <linux/delay.h>
 #include <linux/util_macros.h>
 
-- 
2.43.2


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 2/8] iio: light: al3320a: Drop unused linux/of.h include
  2024-02-18 17:33 [PATCH 0/8] IIO: Drop incorrect includes of linux/of.h Jonathan Cameron
  2024-02-18 17:33 ` [PATCH 1/8] iio: light: vl6180: Drop unused linux/of.h include Jonathan Cameron
@ 2024-02-18 17:33 ` Jonathan Cameron
  2024-02-18 17:33 ` [PATCH 3/8] iio: light: al3010: Switch from linux/of.h to linux/mod_devicetable.h Jonathan Cameron
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Jonathan Cameron @ 2024-02-18 17:33 UTC (permalink / raw)
  To: linux-iio, Andy Shevchenko; +Cc: Jonathan Cameron

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Nothing from linux/of.h used in this driver.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
 drivers/iio/light/al3320a.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/iio/light/al3320a.c b/drivers/iio/light/al3320a.c
index d5957d85c278..105f379b9b41 100644
--- a/drivers/iio/light/al3320a.c
+++ b/drivers/iio/light/al3320a.c
@@ -15,7 +15,6 @@
 #include <linux/bitfield.h>
 #include <linux/i2c.h>
 #include <linux/module.h>
-#include <linux/of.h>
 #include <linux/mod_devicetable.h>
 
 #include <linux/iio/iio.h>
-- 
2.43.2


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 3/8] iio: light: al3010: Switch from linux/of.h to linux/mod_devicetable.h
  2024-02-18 17:33 [PATCH 0/8] IIO: Drop incorrect includes of linux/of.h Jonathan Cameron
  2024-02-18 17:33 ` [PATCH 1/8] iio: light: vl6180: Drop unused linux/of.h include Jonathan Cameron
  2024-02-18 17:33 ` [PATCH 2/8] iio: light: al3320a: " Jonathan Cameron
@ 2024-02-18 17:33 ` Jonathan Cameron
  2024-02-18 17:33 ` [PATCH 4/8] iio: adc: ads8688: Switch to mod_devicetable.h for struct of_device_id definition Jonathan Cameron
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Jonathan Cameron @ 2024-02-18 17:33 UTC (permalink / raw)
  To: linux-iio, Andy Shevchenko; +Cc: Jonathan Cameron

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

The only of specific definition used is of_device_id table and that
is found in mod_devicetable.h not of.h

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
 drivers/iio/light/al3010.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/light/al3010.c b/drivers/iio/light/al3010.c
index 8f0119f392b7..53569587ccb7 100644
--- a/drivers/iio/light/al3010.c
+++ b/drivers/iio/light/al3010.c
@@ -17,7 +17,7 @@
 #include <linux/bitfield.h>
 #include <linux/i2c.h>
 #include <linux/module.h>
-#include <linux/of.h>
+#include <linux/mod_devicetable.h>
 
 #include <linux/iio/iio.h>
 #include <linux/iio/sysfs.h>
-- 
2.43.2


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 4/8] iio: adc: ads8688: Switch to mod_devicetable.h for struct of_device_id definition
  2024-02-18 17:33 [PATCH 0/8] IIO: Drop incorrect includes of linux/of.h Jonathan Cameron
                   ` (2 preceding siblings ...)
  2024-02-18 17:33 ` [PATCH 3/8] iio: light: al3010: Switch from linux/of.h to linux/mod_devicetable.h Jonathan Cameron
@ 2024-02-18 17:33 ` Jonathan Cameron
  2024-02-18 17:33 ` [PATCH 5/8] iio: accel: adxl372: Switch from linux/of.h to linux/mod_devicetable.h Jonathan Cameron
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Jonathan Cameron @ 2024-02-18 17:33 UTC (permalink / raw)
  To: linux-iio, Andy Shevchenko; +Cc: Jonathan Cameron

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

of.h was only included to get access to this structure, so include the
correct header directly instead.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
 drivers/iio/adc/ti-ads8688.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/adc/ti-ads8688.c b/drivers/iio/adc/ti-ads8688.c
index ef06a897421a..9440a268a78c 100644
--- a/drivers/iio/adc/ti-ads8688.c
+++ b/drivers/iio/adc/ti-ads8688.c
@@ -11,7 +11,7 @@
 #include <linux/regulator/consumer.h>
 #include <linux/err.h>
 #include <linux/module.h>
-#include <linux/of.h>
+#include <linux/mod_devicetable.h>
 
 #include <linux/iio/iio.h>
 #include <linux/iio/buffer.h>
-- 
2.43.2


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 5/8] iio: accel: adxl372: Switch from linux/of.h to linux/mod_devicetable.h
  2024-02-18 17:33 [PATCH 0/8] IIO: Drop incorrect includes of linux/of.h Jonathan Cameron
                   ` (3 preceding siblings ...)
  2024-02-18 17:33 ` [PATCH 4/8] iio: adc: ads8688: Switch to mod_devicetable.h for struct of_device_id definition Jonathan Cameron
@ 2024-02-18 17:33 ` Jonathan Cameron
  2024-02-18 17:33 ` [PATCH 6/8] iio: accel: bma180: " Jonathan Cameron
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Jonathan Cameron @ 2024-02-18 17:33 UTC (permalink / raw)
  To: linux-iio, Andy Shevchenko; +Cc: Jonathan Cameron

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

The only of specific definition used is of_device_id table and that
is found in mod_devicetable.h not of.h

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
 drivers/iio/accel/adxl372_spi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/accel/adxl372_spi.c b/drivers/iio/accel/adxl372_spi.c
index 75a88f16c6c9..787699773f96 100644
--- a/drivers/iio/accel/adxl372_spi.c
+++ b/drivers/iio/accel/adxl372_spi.c
@@ -6,8 +6,8 @@
  */
 
 #include <linux/module.h>
+#include <linux/mod_devicetable.h>
 #include <linux/regmap.h>
-#include <linux/of.h>
 #include <linux/spi/spi.h>
 
 #include "adxl372.h"
-- 
2.43.2


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 6/8] iio: accel: bma180: Switch from linux/of.h to linux/mod_devicetable.h
  2024-02-18 17:33 [PATCH 0/8] IIO: Drop incorrect includes of linux/of.h Jonathan Cameron
                   ` (4 preceding siblings ...)
  2024-02-18 17:33 ` [PATCH 5/8] iio: accel: adxl372: Switch from linux/of.h to linux/mod_devicetable.h Jonathan Cameron
@ 2024-02-18 17:33 ` Jonathan Cameron
  2024-02-18 17:33 ` [PATCH 7/8] iio: accel: kxsd9: " Jonathan Cameron
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Jonathan Cameron @ 2024-02-18 17:33 UTC (permalink / raw)
  To: linux-iio, Andy Shevchenko; +Cc: Jonathan Cameron

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

The only of specific definition used is of_device_id table and that
is found in mod_devicetable.h not of.h

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
 drivers/iio/accel/bma180.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/accel/bma180.c b/drivers/iio/accel/bma180.c
index ab4fccb24b6c..6581772cb0c4 100644
--- a/drivers/iio/accel/bma180.c
+++ b/drivers/iio/accel/bma180.c
@@ -13,10 +13,10 @@
  */
 
 #include <linux/module.h>
+#include <linux/mod_devicetable.h>
 #include <linux/i2c.h>
 #include <linux/interrupt.h>
 #include <linux/delay.h>
-#include <linux/of.h>
 #include <linux/bitops.h>
 #include <linux/regulator/consumer.h>
 #include <linux/slab.h>
-- 
2.43.2


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 7/8] iio: accel: kxsd9: Switch from linux/of.h to linux/mod_devicetable.h
  2024-02-18 17:33 [PATCH 0/8] IIO: Drop incorrect includes of linux/of.h Jonathan Cameron
                   ` (5 preceding siblings ...)
  2024-02-18 17:33 ` [PATCH 6/8] iio: accel: bma180: " Jonathan Cameron
@ 2024-02-18 17:33 ` Jonathan Cameron
  2024-02-18 17:33 ` [PATCH 8/8] iio: dac: mcp4821: Switch to including mod_devicetable.h for struct of_device_id definition Jonathan Cameron
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Jonathan Cameron @ 2024-02-18 17:33 UTC (permalink / raw)
  To: linux-iio, Andy Shevchenko; +Cc: Jonathan Cameron

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

The only of specific definition used is of_device_id table and that
is found in mod_devicetable.h not of.h

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
 drivers/iio/accel/kxsd9-spi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/accel/kxsd9-spi.c b/drivers/iio/accel/kxsd9-spi.c
index 1719a9f1d90a..4414670dfb43 100644
--- a/drivers/iio/accel/kxsd9-spi.c
+++ b/drivers/iio/accel/kxsd9-spi.c
@@ -1,9 +1,9 @@
 // SPDX-License-Identifier: GPL-2.0-only
 #include <linux/device.h>
 #include <linux/kernel.h>
-#include <linux/of.h>
 #include <linux/spi/spi.h>
 #include <linux/module.h>
+#include <linux/mod_devicetable.h>
 #include <linux/slab.h>
 #include <linux/regmap.h>
 
-- 
2.43.2


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 8/8] iio: dac: mcp4821: Switch to including mod_devicetable.h for struct of_device_id definition.
  2024-02-18 17:33 [PATCH 0/8] IIO: Drop incorrect includes of linux/of.h Jonathan Cameron
                   ` (6 preceding siblings ...)
  2024-02-18 17:33 ` [PATCH 7/8] iio: accel: kxsd9: " Jonathan Cameron
@ 2024-02-18 17:33 ` Jonathan Cameron
  2024-02-19  9:20 ` [PATCH 0/8] IIO: Drop incorrect includes of linux/of.h Nuno Sá
  2024-02-19 12:24 ` Andy Shevchenko
  9 siblings, 0 replies; 12+ messages in thread
From: Jonathan Cameron @ 2024-02-18 17:33 UTC (permalink / raw)
  To: linux-iio, Andy Shevchenko; +Cc: Jonathan Cameron

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

of.h was only included for this definition, so include the correct header
instead.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
 drivers/iio/dac/mcp4821.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/dac/mcp4821.c b/drivers/iio/dac/mcp4821.c
index 8a0480d33845..782e8f6b7782 100644
--- a/drivers/iio/dac/mcp4821.c
+++ b/drivers/iio/dac/mcp4821.c
@@ -17,7 +17,7 @@
  */
 
 #include <linux/module.h>
-#include <linux/of.h>
+#include <linux/mod_devicetable.h>
 #include <linux/spi/spi.h>
 
 #include <linux/iio/iio.h>
-- 
2.43.2


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH 0/8] IIO: Drop incorrect includes of linux/of.h
  2024-02-18 17:33 [PATCH 0/8] IIO: Drop incorrect includes of linux/of.h Jonathan Cameron
                   ` (7 preceding siblings ...)
  2024-02-18 17:33 ` [PATCH 8/8] iio: dac: mcp4821: Switch to including mod_devicetable.h for struct of_device_id definition Jonathan Cameron
@ 2024-02-19  9:20 ` Nuno Sá
  2024-02-19 12:24 ` Andy Shevchenko
  9 siblings, 0 replies; 12+ messages in thread
From: Nuno Sá @ 2024-02-19  9:20 UTC (permalink / raw)
  To: Jonathan Cameron, linux-iio, Andy Shevchenko; +Cc: Jonathan Cameron

On Sun, 2024-02-18 at 17:33 +0000, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> These were false positives when I was looking at which drivers
> should be converted over to fwnode based handling from
> linux/property.h
> 
> None of them use anything defined in linux/of.h, so drop the include
> and include more specific headers (mostly linux/mod_devicetable.h)
> instead.
> 
> Jonathan Cameron (8):
>   iio: light: vl6180: Drop unused linux/of.h include
>   iio: light: al3320a: Drop unused linux/of.h include
>   iio: light: al3010: Switch from linux/of.h to linux/mod_devicetable.h
>   iio: adc: ads8688: Switch to mod_devicetable.h for struct of_device_id
>     definition
>   iio: accel: adxl372: Switch from linux/of.h to linux/mod_devicetable.h
>   iio: accel: bma180: Switch from linux/of.h to linux/mod_devicetable.h
>   iio: accel: kxsd9: Switch from linux/of.h to linux/mod_devicetable.h
>   iio: dac: mcp4821: Switch to including mod_devicetable.h for struct
>     of_device_id definition.
> 
>  drivers/iio/accel/adxl372_spi.c | 2 +-
>  drivers/iio/accel/bma180.c      | 2 +-
>  drivers/iio/accel/kxsd9-spi.c   | 2 +-
>  drivers/iio/adc/ti-ads8688.c    | 2 +-
>  drivers/iio/dac/mcp4821.c       | 2 +-
>  drivers/iio/light/al3010.c      | 2 +-
>  drivers/iio/light/al3320a.c     | 1 -
>  drivers/iio/light/vl6180.c      | 1 -
>  8 files changed, 6 insertions(+), 8 deletions(-)
> 

Reviewed-by: Nuno Sa <nuno.sa@analog.com>


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 0/8] IIO: Drop incorrect includes of linux/of.h
  2024-02-18 17:33 [PATCH 0/8] IIO: Drop incorrect includes of linux/of.h Jonathan Cameron
                   ` (8 preceding siblings ...)
  2024-02-19  9:20 ` [PATCH 0/8] IIO: Drop incorrect includes of linux/of.h Nuno Sá
@ 2024-02-19 12:24 ` Andy Shevchenko
  2024-02-24 15:57   ` Jonathan Cameron
  9 siblings, 1 reply; 12+ messages in thread
From: Andy Shevchenko @ 2024-02-19 12:24 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: linux-iio, Jonathan Cameron

On Sun, Feb 18, 2024 at 05:33:15PM +0000, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> These were false positives when I was looking at which drivers
> should be converted over to fwnode based handling from
> linux/property.h
> 
> None of them use anything defined in linux/of.h, so drop the include
> and include more specific headers (mostly linux/mod_devicetable.h)
> instead.

Simple and important one (makes me not look into unrelated code),
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 0/8] IIO: Drop incorrect includes of linux/of.h
  2024-02-19 12:24 ` Andy Shevchenko
@ 2024-02-24 15:57   ` Jonathan Cameron
  0 siblings, 0 replies; 12+ messages in thread
From: Jonathan Cameron @ 2024-02-24 15:57 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: linux-iio, Jonathan Cameron

On Mon, 19 Feb 2024 14:24:29 +0200
Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:

> On Sun, Feb 18, 2024 at 05:33:15PM +0000, Jonathan Cameron wrote:
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > 
> > These were false positives when I was looking at which drivers
> > should be converted over to fwnode based handling from
> > linux/property.h
> > 
> > None of them use anything defined in linux/of.h, so drop the include
> > and include more specific headers (mostly linux/mod_devicetable.h)
> > instead.  
> 
> Simple and important one (makes me not look into unrelated code),
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 

Applied.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-02-24 15:58 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-18 17:33 [PATCH 0/8] IIO: Drop incorrect includes of linux/of.h Jonathan Cameron
2024-02-18 17:33 ` [PATCH 1/8] iio: light: vl6180: Drop unused linux/of.h include Jonathan Cameron
2024-02-18 17:33 ` [PATCH 2/8] iio: light: al3320a: " Jonathan Cameron
2024-02-18 17:33 ` [PATCH 3/8] iio: light: al3010: Switch from linux/of.h to linux/mod_devicetable.h Jonathan Cameron
2024-02-18 17:33 ` [PATCH 4/8] iio: adc: ads8688: Switch to mod_devicetable.h for struct of_device_id definition Jonathan Cameron
2024-02-18 17:33 ` [PATCH 5/8] iio: accel: adxl372: Switch from linux/of.h to linux/mod_devicetable.h Jonathan Cameron
2024-02-18 17:33 ` [PATCH 6/8] iio: accel: bma180: " Jonathan Cameron
2024-02-18 17:33 ` [PATCH 7/8] iio: accel: kxsd9: " Jonathan Cameron
2024-02-18 17:33 ` [PATCH 8/8] iio: dac: mcp4821: Switch to including mod_devicetable.h for struct of_device_id definition Jonathan Cameron
2024-02-19  9:20 ` [PATCH 0/8] IIO: Drop incorrect includes of linux/of.h Nuno Sá
2024-02-19 12:24 ` Andy Shevchenko
2024-02-24 15:57   ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox