IIO: Drop incorrect includes of linux/of.h
Subsystems (4)
Jonathan Cameron
maintainercover IIO: Drop incorrect includes of linux/of.h
From: Jonathan Cameron <[email protected]>
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(-)
Signature · 1 line
2.43.2
Jonathan Cameron
maintainerPATCH 1/8 iio: light: vl6180: Drop unused linux/of.h include
From: Jonathan Cameron <[email protected]>
Nothing from linux/of.h is used in this driver.
--- drivers/iio/light/vl6180.c | 1 - 1 file changed, 1 deletion(-)
drivers/iio/light/vl6180.c +0 -1
@@ -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>
Signature · 1 line
2.43.2
Jonathan Cameron
maintainerPATCH 2/8 iio: light: al3320a: Drop unused linux/of.h include
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
Nothing from linux/of.h used in this driver.
--- drivers/iio/light/al3320a.c | 1 - 1 file changed, 1 deletion(-)
drivers/iio/light/al3320a.c +0 -1
@@ -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>
Signature · 1 line
2.43.2
Jonathan Cameron
maintainerPATCH 3/8 iio: light: al3010: Switch from linux/of.h to linux/mod_devicetable.h
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
The only of specific definition used is of_device_id table and that is found in mod_devicetable.h not of.h
--- drivers/iio/light/al3010.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/light/al3010.c +1 -1
@@ -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>
Signature · 1 line
2.43.2
Jonathan Cameron
maintainerPATCH 4/8 iio: adc: ads8688: Switch to mod_devicetable.h for struct of_device_id definition
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
of.h was only included to get access to this structure, so include the correct header directly instead.
--- drivers/iio/adc/ti-ads8688.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/ti-ads8688.c +1 -1
@@ -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>
Signature · 1 line
2.43.2
Jonathan Cameron
maintainerPATCH 5/8 iio: accel: adxl372: Switch from linux/of.h to linux/mod_devicetable.h
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
The only of specific definition used is of_device_id table and that is found in mod_devicetable.h not of.h
--- drivers/iio/accel/adxl372_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/accel/adxl372_spi.c +1 -1
@@ -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"
Signature · 1 line
2.43.2
Jonathan Cameron
maintainerPATCH 6/8 iio: accel: bma180: Switch from linux/of.h to linux/mod_devicetable.h
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
The only of specific definition used is of_device_id table and that is found in mod_devicetable.h not of.h
--- drivers/iio/accel/bma180.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/accel/bma180.c +1 -1
@@ -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>
Signature · 1 line
2.43.2
Jonathan Cameron
maintainerPATCH 7/8 iio: accel: kxsd9: Switch from linux/of.h to linux/mod_devicetable.h
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
The only of specific definition used is of_device_id table and that is found in mod_devicetable.h not of.h
--- drivers/iio/accel/kxsd9-spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/accel/kxsd9-spi.c +1 -1
@@ -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>
Signature · 1 line
2.43.2
Jonathan Cameron
maintainerPATCH 8/8 iio: dac: mcp4821: Switch to including mod_devicetable.h for struct of_device_id definition.
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
of.h was only included for this definition, so include the correct header instead.
--- drivers/iio/dac/mcp4821.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/dac/mcp4821.c +1 -1
@@ -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>
Signature · 1 line
2.43.2
Quoted 30 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
These were false positives when I was looking at which drivers should be converted over to fwnode based handling from
linux/property.hNone of them use anything defined in
linux/of.h, so drop the include and include more specific headers (mostlylinux/mod_devicetable.h) instead.Jonathan Cameron (8):
iio: light: vl6180: Drop unusedlinux/of.hinclude
iio: light: al3320a: Drop unusedlinux/of.hinclude
iio: light: al3010: Switch fromlinux/of.htolinux/mod_devicetable.h
iio: adc: ads8688: Switch tomod_devicetable.hfor structof_device_iddefinition
iio: accel: adxl372: Switch fromlinux/of.htolinux/mod_devicetable.h
iio: accel: bma180: Switch fromlinux/of.htolinux/mod_devicetable.h
iio: accel: kxsd9: Switch fromlinux/of.htolinux/mod_devicetable.h
iio: dac: mcp4821: Switch to includingmod_devicetable.hfor structof_device_iddefinition.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 -
Quoted 2 lines
8 files changed, 6 insertions(+), 8 deletions(-)
Quoted 9 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
These were false positives when I was looking at which drivers should be converted over to fwnode based handling from
linux/property.hNone of them use anything defined in
linux/of.h, so drop the include and include more specific headers (mostlylinux/mod_devicetable.h) instead.
Simple and important one (makes me not look into unrelated code),
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 7 lines · On Mon, 19 Feb 2024 14:24:29 +0200 Andy Shevchenko…
Quoted 6 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
These were false positives when I was looking at which drivers should be converted over to fwnode based handling from
linux/property.h
Quoted 7 lines
Quoted 3 lines
None of them use anything defined in
linux/of.h, so drop the include and include more specific headers (mostlylinux/mod_devicetable.h) instead.Simple and important one (makes me not look into unrelated code),
Reviewed-by Andy Shevchenko <[email protected]>
Applied.