hwmon: Explicitly include correct DT includes
authorRob Herring <robh@kernel.org>
Fri, 14 Jul 2023 17:46:04 +0000 (11:46 -0600)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 21 Aug 2023 13:04:29 +0000 (06:04 -0700)
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>
37 files changed:
drivers/hwmon/ad7418.c
drivers/hwmon/ads7828.c
drivers/hwmon/adt7475.c
drivers/hwmon/as370-hwmon.c
drivers/hwmon/aspeed-pwm-tacho.c
drivers/hwmon/g762.c
drivers/hwmon/gxp-fan-ctrl.c
drivers/hwmon/ina2xx.c
drivers/hwmon/lm63.c
drivers/hwmon/lm75.c
drivers/hwmon/lm85.c
drivers/hwmon/lm90.c
drivers/hwmon/lochnagar-hwmon.c
drivers/hwmon/ltq-cputemp.c
drivers/hwmon/max31730.c
drivers/hwmon/max6621.c
drivers/hwmon/max6697.c
drivers/hwmon/mcp3021.c
drivers/hwmon/nsa320-hwmon.c
drivers/hwmon/pmbus/dps920ab.c
drivers/hwmon/pmbus/ibm-cffps.c
drivers/hwmon/pmbus/ir38064.c
drivers/hwmon/pmbus/max20730.c
drivers/hwmon/pmbus/mp5023.c
drivers/hwmon/pmbus/mpq7932.c
drivers/hwmon/pmbus/q54sj108a2.c
drivers/hwmon/pmbus/tps53679.c
drivers/hwmon/pmbus/ucd9000.c
drivers/hwmon/pmbus/ucd9200.c
drivers/hwmon/sbtsi_temp.c
drivers/hwmon/scpi-hwmon.c
drivers/hwmon/tmp421.c
drivers/hwmon/tmp464.c
drivers/hwmon/tps23861.c
drivers/hwmon/ultra45_env.c
drivers/hwmon/vexpress-hwmon.c
drivers/hwmon/w83773g.c

index ffe81e445010a8a1924249281b91bed752afc907..bcea66eac82befbf8e0c521a7ad3fef308ee9e8c 100644 (file)
@@ -16,7 +16,7 @@
 #include <linux/hwmon-sysfs.h>
 #include <linux/err.h>
 #include <linux/mutex.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/delay.h>
 #include <linux/slab.h>
 
index 1932613ec0953f90183c8bfc47f568ab80e7d5d1..e86894e356399d77d12f51b19ab6ef0ecffc4175 100644 (file)
@@ -18,7 +18,7 @@
 #include <linux/i2c.h>
 #include <linux/init.h>
 #include <linux/module.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/platform_data/ads7828.h>
 #include <linux/regmap.h>
 #include <linux/slab.h>
index c0ce88324ea6e69b0a2da563f824e7b6a536d4d8..5363254644dad28a8d29dbeb3bf40aec756e5813 100644 (file)
@@ -10,7 +10,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/of_device.h>
 #include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/i2c.h>
index fffbf385a57f0d1577c271b447f9ebf95d7cc4ce..316454bd983d24c122b6c67b64819cba1da8aa86 100644 (file)
@@ -11,7 +11,8 @@
 #include <linux/init.h>
 #include <linux/io.h>
 #include <linux/module.h>
-#include <linux/of_device.h>
+#include <linux/mod_devicetable.h>
+#include <linux/platform_device.h>
 
 #define CTRL           0x0
 #define  PD            BIT(0)
index d11f674e3dc37e7d601a1dbf87fb73f7eb47cd0e..997df4b405098ff765acfb0e10875130360fc439 100644 (file)
@@ -12,8 +12,7 @@
 #include <linux/io.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/of_device.h>
-#include <linux/of_platform.h>
+#include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/regmap.h>
 #include <linux/reset.h>
index 1b6ff4712138d26abbd5a707e38a4dc4283cd297..fad69ef56c75b8f4aadaa66148012528a5862637 100644 (file)
@@ -39,7 +39,6 @@
 #include <linux/kernel.h>
 #include <linux/clk.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/platform_data/g762.h>
 
 #define DRVNAME "g762"
index 2e05bc2f627a330023909a8109dd790f9a6564a3..00e057050437e73b03d1dc2c299035a5f48917a0 100644 (file)
@@ -6,7 +6,7 @@
 #include <linux/hwmon.h>
 #include <linux/io.h>
 #include <linux/module.h>
-#include <linux/of_device.h>
+#include <linux/mod_devicetable.h>
 #include <linux/platform_device.h>
 
 #define OFS_FAN_INST   0 /* Is 0 because plreg base will be set at INST */
index cfd7efef5cdf4376547827c813836345786c1730..a47973e2d606506daf6737e77ae09800936641bf 100644 (file)
@@ -31,7 +31,6 @@
 #include <linux/hwmon.h>
 #include <linux/hwmon-sysfs.h>
 #include <linux/jiffies.h>
-#include <linux/of_device.h>
 #include <linux/of.h>
 #include <linux/delay.h>
 #include <linux/util_macros.h>
index 6972454eb4e00b53910b826bc9b9c2d87de1ccf1..562c94c7d831c33a7cc54b4fc7550152c96d0168 100644 (file)
@@ -33,7 +33,7 @@
 #include <linux/hwmon.h>
 #include <linux/err.h>
 #include <linux/mutex.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/sysfs.h>
 #include <linux/types.h>
 
index 72e634d1b857bb27368e2512382dd0480a1657e8..bcfa8193e5e779119770e529e7a94e41205ea517 100644 (file)
@@ -13,7 +13,6 @@
 #include <linux/hwmon.h>
 #include <linux/hwmon-sysfs.h>
 #include <linux/err.h>
-#include <linux/of_device.h>
 #include <linux/of.h>
 #include <linux/regmap.h>
 #include <linux/util_macros.h>
index 8540178f5b74112772982b66828b6873cc6b2b73..2a62ea7b25a929e2989980a4d9cdeac519221577 100644 (file)
@@ -12,7 +12,7 @@
  */
 
 #include <linux/module.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/jiffies.h>
index 90101c236f356579daa1c255f7430c8b57d977fc..b25ae8b7ec90c82c5b16b14d9edb368e5606bc6e 100644 (file)
 #include <linux/kstrtox.h>
 #include <linux/module.h>
 #include <linux/mutex.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/regulator/consumer.h>
 #include <linux/slab.h>
 #include <linux/workqueue.h>
index 6350904a8a8b4603ef213876ea057f1f7a282b2f..5202dddfd61efc3521b83c840575994e261f4fd2 100644 (file)
@@ -16,7 +16,6 @@
 #include <linux/mfd/lochnagar2_regs.h>
 #include <linux/module.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/platform_device.h>
 #include <linux/regmap.h>
 
index 08e09a82acab10af60ec543ea9f5d77c518ad6c3..f7e4a4ca5239e4904ebe4a30d0bf8dc478c497a3 100644 (file)
@@ -9,8 +9,9 @@
 #include <linux/hwmon.h>
 #include <linux/hwmon-sysfs.h>
 #include <linux/init.h>
+#include <linux/mod_devicetable.h>
 #include <linux/module.h>
-#include <linux/of_device.h>
+#include <linux/platform_device.h>
 
 #include <lantiq_soc.h>
 
index b1300ca9db1f746dfff416670c80e2e74f84a23d..7d237db6e57c89046b3e83e66c9a49a05c9d2cd6 100644 (file)
@@ -11,7 +11,6 @@
 #include <linux/init.h>
 #include <linux/hwmon.h>
 #include <linux/module.h>
-#include <linux/of_device.h>
 #include <linux/of.h>
 #include <linux/slab.h>
 
index 7f709fd1af8958ebbda6f7f7a69e9f63f6b40f99..af7e62685898315173fe15dcb865534fba4854dc 100644 (file)
@@ -12,7 +12,7 @@
 #include <linux/i2c.h>
 #include <linux/init.h>
 #include <linux/module.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/regmap.h>
 
 #define MAX6621_DRV_NAME               "max6621"
index 3a67778f111cdc5d4c4661c41f412af9b0875b0a..fe826fcf999097ac0797a8448e67261ebf00e7f7 100644 (file)
@@ -15,7 +15,6 @@
 #include <linux/hwmon-sysfs.h>
 #include <linux/err.h>
 #include <linux/mutex.h>
-#include <linux/of_device.h>
 #include <linux/of.h>
 
 #include <linux/platform_data/max6697.h>
index 127e15ff3e76430c8e13f471239f169a85a967de..9814eaf2456447db95a8ee282c2bc4b46f207461 100644 (file)
@@ -20,7 +20,6 @@
 #include <linux/err.h>
 #include <linux/device.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 
 /* Vdd / reference voltage in millivolt */
 #define MCP3021_VDD_REF_MAX    5500
index ebe6b031e56f08c10c1c3d37545f02c4070a8e02..e2633446954914ae78650cd881f41418775dba43 100644 (file)
@@ -20,8 +20,6 @@
 #include <linux/module.h>
 #include <linux/mutex.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
-#include <linux/of_platform.h>
 #include <linux/platform_device.h>
 
 /* Tests for error return values rely upon this value being < 0x80 */
index f7ff3e4650b71e66bb0981d9e331cb705e1c9904..04e0d598a6e54442e37292e7d5964a9d5ae59d14 100644 (file)
@@ -9,7 +9,7 @@
 #include <linux/debugfs.h>
 #include <linux/i2c.h>
 #include <linux/module.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include "pmbus.h"
 
 struct dps920ab_data {
index c791925b89077be8b2abd30deadb0c4cc0d51389..5b11aacda4d2f5a7badf7cf8818ac004567064e9 100644 (file)
@@ -13,7 +13,7 @@
 #include <linux/leds.h>
 #include <linux/module.h>
 #include <linux/mutex.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/pmbus.h>
 
 #include "pmbus.h"
index 871c322d3d515447cf49f63f3c487601867386cd..04185be3fdb6d087d5ad16f94dc0bc5f5f614386 100644 (file)
@@ -6,7 +6,7 @@
  *
  * VOUT_MODE is not supported by the device. The driver fakes VOUT linear16
  * mode with exponent value -8 as direct mode with m=256/b=0/R=0.
- *          
+ *
  * The device supports VOUT_PEAK, IOUT_PEAK, and TEMPERATURE_PEAK, however
  * this driver does not currently support them.
  */
@@ -16,7 +16,7 @@
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/regulator/driver.h>
 #include "pmbus.h"
 
index 7bcf279950331f70315e1ff198d35ca534363f0b..6f99085c2c3b994ea00c4f9a58eba21a21bc7376 100644 (file)
@@ -15,7 +15,7 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/mutex.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/pmbus.h>
 #include <linux/util_macros.h>
 #include "pmbus.h"
index c4c4324d2b7466c64f347db6e138410420dbf7db..21acb7fd9a1afe6c346b4a2eda7df9a6962710b2 100644 (file)
@@ -5,7 +5,7 @@
 
 #include <linux/i2c.h>
 #include <linux/module.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include "pmbus.h"
 
 static struct pmbus_driver_info mp5023_info = {
index 865d42edda1a5417e5642e48775ffd5e65768723..6c62f01da7c6123f9e7083ce0cc606ba92f33ccd 100644 (file)
@@ -12,7 +12,7 @@
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/pmbus.h>
 #include "pmbus.h"
 
index b830f3b02bcc9b7dd314b53e7acbcb11da8c5e56..a235c1cdf4fec54b820a78ddeb73057019b10943 100644 (file)
@@ -10,7 +10,7 @@
 #include <linux/i2c.h>
 #include <linux/kstrtox.h>
 #include <linux/module.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include "pmbus.h"
 
 #define STORE_DEFAULT_ALL              0x11
index ef99005a3af5ec7d1f8039a5fa7e3c67c735d420..e77b12f342b498f8c7e65ae1c082035e2ba1f3af 100644 (file)
@@ -12,7 +12,7 @@
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include "pmbus.h"
 
 enum chips {
index c404d306e8f7f0f00c1ea1cb79cab9b01ae1ea47..b1d1d4214e695feef4cde2c659774485ebe32739 100644 (file)
@@ -10,7 +10,7 @@
 #include <linux/delay.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/init.h>
 #include <linux/err.h>
 #include <linux/slab.h>
index a82847945508814624f5cd9e01089ed709ec7ebf..e4aad64b2d946d164324c115da593b835e0182ec 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/init.h>
 #include <linux/err.h>
 #include <linux/slab.h>
index b79cece4ac9aba5e4475a8853ab7191fb87cf91a..dd85cf89f008a99c938fc2837774e1d40c603675 100644 (file)
@@ -13,7 +13,6 @@
 #include <linux/hwmon.h>
 #include <linux/module.h>
 #include <linux/mutex.h>
-#include <linux/of_device.h>
 #include <linux/of.h>
 
 /*
index 121e5e9f487fb92d163e6d429666f2664b2c78d9..a0d2206095656dbadaee2e90ee74c714e689b7b3 100644 (file)
@@ -8,7 +8,7 @@
 
 #include <linux/hwmon.h>
 #include <linux/module.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/scpi_protocol.h>
 #include <linux/slab.h>
index 3cde3916ab6d5d5b49dc62172d4cc738526004e7..10b66c9ce04522fcfab060b0d1017074d27ea1d8 100644 (file)
@@ -20,7 +20,7 @@
 #include <linux/hwmon-sysfs.h>
 #include <linux/err.h>
 #include <linux/mutex.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/sysfs.h>
 
 /* Addresses to scan */
index 4b79c3f4d9fe4aafc520495b25a283253b2dec25..f58ca4c6acb6eef1987ca0c006b36ae74b93df27 100644 (file)
@@ -14,7 +14,7 @@
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/mutex.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/regmap.h>
 #include <linux/slab.h>
 
index 8fbbb29ae11d2e74f38e18ebd23584798575e3e6..d33ecbac00d6d91e8a4d429739560056ff75ff37 100644 (file)
@@ -14,7 +14,7 @@
 #include <linux/hwmon.h>
 #include <linux/i2c.h>
 #include <linux/module.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/regmap.h>
 
 #define TEMPERATURE                    0x2c
index b23cff2e3d5d1cfdcb82042f3ab93121f65e4e31..3b580f229887247706afc3e2af635754241850d5 100644 (file)
@@ -9,7 +9,8 @@
 #include <linux/types.h>
 #include <linux/slab.h>
 #include <linux/module.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
+#include <linux/platform_device.h>
 #include <linux/io.h>
 #include <linux/hwmon.h>
 #include <linux/hwmon-sysfs.h>
index 2ac5fb96bba48df5990c8f460d6361b4388459f0..d82a3b454d0ed3c14cf67f392e42443cc35f4b36 100644 (file)
@@ -13,7 +13,6 @@
 #include <linux/hwmon-sysfs.h>
 #include <linux/module.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/platform_device.h>
 #include <linux/vexpress.h>
 
index 7f3615f5587cc3c2ae19c00603cb9c72aba73956..045eea8378c2da7b167696124ed00632b07e2f57 100644 (file)
@@ -12,7 +12,7 @@
 #include <linux/hwmon.h>
 #include <linux/hwmon-sysfs.h>
 #include <linux/err.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/regmap.h>
 
 /* W83773 has 3 channels */