Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

hwmon: Explicitly include correct DT includes

The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it as merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.

Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230714174607.4057185-1-robh@kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>

authored by

Rob Herring and committed by
Guenter Roeck
39f03438 6698cbd6

+30 -40
+1 -1
drivers/hwmon/ad7418.c
··· 16 16 #include <linux/hwmon-sysfs.h> 17 17 #include <linux/err.h> 18 18 #include <linux/mutex.h> 19 - #include <linux/of_device.h> 19 + #include <linux/of.h> 20 20 #include <linux/delay.h> 21 21 #include <linux/slab.h> 22 22
+1 -1
drivers/hwmon/ads7828.c
··· 18 18 #include <linux/i2c.h> 19 19 #include <linux/init.h> 20 20 #include <linux/module.h> 21 - #include <linux/of_device.h> 21 + #include <linux/of.h> 22 22 #include <linux/platform_data/ads7828.h> 23 23 #include <linux/regmap.h> 24 24 #include <linux/slab.h>
-1
drivers/hwmon/adt7475.c
··· 10 10 */ 11 11 12 12 #include <linux/module.h> 13 - #include <linux/of_device.h> 14 13 #include <linux/init.h> 15 14 #include <linux/slab.h> 16 15 #include <linux/i2c.h>
+2 -1
drivers/hwmon/as370-hwmon.c
··· 11 11 #include <linux/init.h> 12 12 #include <linux/io.h> 13 13 #include <linux/module.h> 14 - #include <linux/of_device.h> 14 + #include <linux/mod_devicetable.h> 15 + #include <linux/platform_device.h> 15 16 16 17 #define CTRL 0x0 17 18 #define PD BIT(0)
+1 -2
drivers/hwmon/aspeed-pwm-tacho.c
··· 12 12 #include <linux/io.h> 13 13 #include <linux/kernel.h> 14 14 #include <linux/module.h> 15 - #include <linux/of_device.h> 16 - #include <linux/of_platform.h> 15 + #include <linux/of.h> 17 16 #include <linux/platform_device.h> 18 17 #include <linux/regmap.h> 19 18 #include <linux/reset.h>
-1
drivers/hwmon/g762.c
··· 39 39 #include <linux/kernel.h> 40 40 #include <linux/clk.h> 41 41 #include <linux/of.h> 42 - #include <linux/of_device.h> 43 42 #include <linux/platform_data/g762.h> 44 43 45 44 #define DRVNAME "g762"
+1 -1
drivers/hwmon/gxp-fan-ctrl.c
··· 6 6 #include <linux/hwmon.h> 7 7 #include <linux/io.h> 8 8 #include <linux/module.h> 9 - #include <linux/of_device.h> 9 + #include <linux/mod_devicetable.h> 10 10 #include <linux/platform_device.h> 11 11 12 12 #define OFS_FAN_INST 0 /* Is 0 because plreg base will be set at INST */
-1
drivers/hwmon/ina2xx.c
··· 31 31 #include <linux/hwmon.h> 32 32 #include <linux/hwmon-sysfs.h> 33 33 #include <linux/jiffies.h> 34 - #include <linux/of_device.h> 35 34 #include <linux/of.h> 36 35 #include <linux/delay.h> 37 36 #include <linux/util_macros.h>
+1 -1
drivers/hwmon/lm63.c
··· 33 33 #include <linux/hwmon.h> 34 34 #include <linux/err.h> 35 35 #include <linux/mutex.h> 36 - #include <linux/of_device.h> 36 + #include <linux/of.h> 37 37 #include <linux/sysfs.h> 38 38 #include <linux/types.h> 39 39
-1
drivers/hwmon/lm75.c
··· 13 13 #include <linux/hwmon.h> 14 14 #include <linux/hwmon-sysfs.h> 15 15 #include <linux/err.h> 16 - #include <linux/of_device.h> 17 16 #include <linux/of.h> 18 17 #include <linux/regmap.h> 19 18 #include <linux/util_macros.h>
+1 -1
drivers/hwmon/lm85.c
··· 12 12 */ 13 13 14 14 #include <linux/module.h> 15 - #include <linux/of_device.h> 15 + #include <linux/of.h> 16 16 #include <linux/init.h> 17 17 #include <linux/slab.h> 18 18 #include <linux/jiffies.h>
+1 -1
drivers/hwmon/lm90.c
··· 106 106 #include <linux/kstrtox.h> 107 107 #include <linux/module.h> 108 108 #include <linux/mutex.h> 109 - #include <linux/of_device.h> 109 + #include <linux/of.h> 110 110 #include <linux/regulator/consumer.h> 111 111 #include <linux/slab.h> 112 112 #include <linux/workqueue.h>
-1
drivers/hwmon/lochnagar-hwmon.c
··· 16 16 #include <linux/mfd/lochnagar2_regs.h> 17 17 #include <linux/module.h> 18 18 #include <linux/of.h> 19 - #include <linux/of_device.h> 20 19 #include <linux/platform_device.h> 21 20 #include <linux/regmap.h> 22 21
+2 -1
drivers/hwmon/ltq-cputemp.c
··· 9 9 #include <linux/hwmon.h> 10 10 #include <linux/hwmon-sysfs.h> 11 11 #include <linux/init.h> 12 + #include <linux/mod_devicetable.h> 12 13 #include <linux/module.h> 13 - #include <linux/of_device.h> 14 + #include <linux/platform_device.h> 14 15 15 16 #include <lantiq_soc.h> 16 17
-1
drivers/hwmon/max31730.c
··· 11 11 #include <linux/init.h> 12 12 #include <linux/hwmon.h> 13 13 #include <linux/module.h> 14 - #include <linux/of_device.h> 15 14 #include <linux/of.h> 16 15 #include <linux/slab.h> 17 16
+1 -1
drivers/hwmon/max6621.c
··· 12 12 #include <linux/i2c.h> 13 13 #include <linux/init.h> 14 14 #include <linux/module.h> 15 - #include <linux/of_device.h> 15 + #include <linux/of.h> 16 16 #include <linux/regmap.h> 17 17 18 18 #define MAX6621_DRV_NAME "max6621"
-1
drivers/hwmon/max6697.c
··· 15 15 #include <linux/hwmon-sysfs.h> 16 16 #include <linux/err.h> 17 17 #include <linux/mutex.h> 18 - #include <linux/of_device.h> 19 18 #include <linux/of.h> 20 19 21 20 #include <linux/platform_data/max6697.h>
-1
drivers/hwmon/mcp3021.c
··· 20 20 #include <linux/err.h> 21 21 #include <linux/device.h> 22 22 #include <linux/of.h> 23 - #include <linux/of_device.h> 24 23 25 24 /* Vdd / reference voltage in millivolt */ 26 25 #define MCP3021_VDD_REF_MAX 5500
-2
drivers/hwmon/nsa320-hwmon.c
··· 20 20 #include <linux/module.h> 21 21 #include <linux/mutex.h> 22 22 #include <linux/of.h> 23 - #include <linux/of_device.h> 24 - #include <linux/of_platform.h> 25 23 #include <linux/platform_device.h> 26 24 27 25 /* Tests for error return values rely upon this value being < 0x80 */
+1 -1
drivers/hwmon/pmbus/dps920ab.c
··· 9 9 #include <linux/debugfs.h> 10 10 #include <linux/i2c.h> 11 11 #include <linux/module.h> 12 - #include <linux/of_device.h> 12 + #include <linux/of.h> 13 13 #include "pmbus.h" 14 14 15 15 struct dps920ab_data {
+1 -1
drivers/hwmon/pmbus/ibm-cffps.c
··· 13 13 #include <linux/leds.h> 14 14 #include <linux/module.h> 15 15 #include <linux/mutex.h> 16 - #include <linux/of_device.h> 16 + #include <linux/of.h> 17 17 #include <linux/pmbus.h> 18 18 19 19 #include "pmbus.h"
+2 -2
drivers/hwmon/pmbus/ir38064.c
··· 6 6 * 7 7 * VOUT_MODE is not supported by the device. The driver fakes VOUT linear16 8 8 * mode with exponent value -8 as direct mode with m=256/b=0/R=0. 9 - * 9 + * 10 10 * The device supports VOUT_PEAK, IOUT_PEAK, and TEMPERATURE_PEAK, however 11 11 * this driver does not currently support them. 12 12 */ ··· 16 16 #include <linux/init.h> 17 17 #include <linux/kernel.h> 18 18 #include <linux/module.h> 19 - #include <linux/of_device.h> 19 + #include <linux/of.h> 20 20 #include <linux/regulator/driver.h> 21 21 #include "pmbus.h" 22 22
+1 -1
drivers/hwmon/pmbus/max20730.c
··· 15 15 #include <linux/kernel.h> 16 16 #include <linux/module.h> 17 17 #include <linux/mutex.h> 18 - #include <linux/of_device.h> 18 + #include <linux/of.h> 19 19 #include <linux/pmbus.h> 20 20 #include <linux/util_macros.h> 21 21 #include "pmbus.h"
+1 -1
drivers/hwmon/pmbus/mp5023.c
··· 5 5 6 6 #include <linux/i2c.h> 7 7 #include <linux/module.h> 8 - #include <linux/of_device.h> 8 + #include <linux/of.h> 9 9 #include "pmbus.h" 10 10 11 11 static struct pmbus_driver_info mp5023_info = {
+1 -1
drivers/hwmon/pmbus/mpq7932.c
··· 12 12 #include <linux/init.h> 13 13 #include <linux/kernel.h> 14 14 #include <linux/module.h> 15 - #include <linux/of_device.h> 15 + #include <linux/of.h> 16 16 #include <linux/pmbus.h> 17 17 #include "pmbus.h" 18 18
+1 -1
drivers/hwmon/pmbus/q54sj108a2.c
··· 10 10 #include <linux/i2c.h> 11 11 #include <linux/kstrtox.h> 12 12 #include <linux/module.h> 13 - #include <linux/of_device.h> 13 + #include <linux/of.h> 14 14 #include "pmbus.h" 15 15 16 16 #define STORE_DEFAULT_ALL 0x11
+1 -1
drivers/hwmon/pmbus/tps53679.c
··· 12 12 #include <linux/init.h> 13 13 #include <linux/kernel.h> 14 14 #include <linux/module.h> 15 - #include <linux/of_device.h> 15 + #include <linux/of.h> 16 16 #include "pmbus.h" 17 17 18 18 enum chips {
+1 -1
drivers/hwmon/pmbus/ucd9000.c
··· 10 10 #include <linux/delay.h> 11 11 #include <linux/kernel.h> 12 12 #include <linux/module.h> 13 - #include <linux/of_device.h> 13 + #include <linux/of.h> 14 14 #include <linux/init.h> 15 15 #include <linux/err.h> 16 16 #include <linux/slab.h>
+1 -1
drivers/hwmon/pmbus/ucd9200.c
··· 7 7 8 8 #include <linux/kernel.h> 9 9 #include <linux/module.h> 10 - #include <linux/of_device.h> 10 + #include <linux/of.h> 11 11 #include <linux/init.h> 12 12 #include <linux/err.h> 13 13 #include <linux/slab.h>
-1
drivers/hwmon/sbtsi_temp.c
··· 13 13 #include <linux/hwmon.h> 14 14 #include <linux/module.h> 15 15 #include <linux/mutex.h> 16 - #include <linux/of_device.h> 17 16 #include <linux/of.h> 18 17 19 18 /*
+1 -1
drivers/hwmon/scpi-hwmon.c
··· 8 8 9 9 #include <linux/hwmon.h> 10 10 #include <linux/module.h> 11 - #include <linux/of_device.h> 11 + #include <linux/of.h> 12 12 #include <linux/platform_device.h> 13 13 #include <linux/scpi_protocol.h> 14 14 #include <linux/slab.h>
+1 -1
drivers/hwmon/tmp421.c
··· 20 20 #include <linux/hwmon-sysfs.h> 21 21 #include <linux/err.h> 22 22 #include <linux/mutex.h> 23 - #include <linux/of_device.h> 23 + #include <linux/of.h> 24 24 #include <linux/sysfs.h> 25 25 26 26 /* Addresses to scan */
+1 -1
drivers/hwmon/tmp464.c
··· 14 14 #include <linux/init.h> 15 15 #include <linux/module.h> 16 16 #include <linux/mutex.h> 17 - #include <linux/of_device.h> 17 + #include <linux/of.h> 18 18 #include <linux/regmap.h> 19 19 #include <linux/slab.h> 20 20
+1 -1
drivers/hwmon/tps23861.c
··· 14 14 #include <linux/hwmon.h> 15 15 #include <linux/i2c.h> 16 16 #include <linux/module.h> 17 - #include <linux/of_device.h> 17 + #include <linux/of.h> 18 18 #include <linux/regmap.h> 19 19 20 20 #define TEMPERATURE 0x2c
+2 -1
drivers/hwmon/ultra45_env.c
··· 9 9 #include <linux/types.h> 10 10 #include <linux/slab.h> 11 11 #include <linux/module.h> 12 - #include <linux/of_device.h> 12 + #include <linux/of.h> 13 + #include <linux/platform_device.h> 13 14 #include <linux/io.h> 14 15 #include <linux/hwmon.h> 15 16 #include <linux/hwmon-sysfs.h>
-1
drivers/hwmon/vexpress-hwmon.c
··· 13 13 #include <linux/hwmon-sysfs.h> 14 14 #include <linux/module.h> 15 15 #include <linux/of.h> 16 - #include <linux/of_device.h> 17 16 #include <linux/platform_device.h> 18 17 #include <linux/vexpress.h> 19 18
+1 -1
drivers/hwmon/w83773g.c
··· 12 12 #include <linux/hwmon.h> 13 13 #include <linux/hwmon-sysfs.h> 14 14 #include <linux/err.h> 15 - #include <linux/of_device.h> 15 + #include <linux/of.h> 16 16 #include <linux/regmap.h> 17 17 18 18 /* W83773 has 3 channels */