2023-07-14 18:41:11

by Rob Herring

[permalink] [raw]
Subject: [PATCH] thermal: 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 <[email protected]>
---
drivers/thermal/amlogic_thermal.c | 2 --
drivers/thermal/broadcom/bcm2711_thermal.c | 2 +-
drivers/thermal/broadcom/brcmstb_thermal.c | 2 +-
drivers/thermal/hisi_thermal.c | 2 +-
drivers/thermal/imx8mm_thermal.c | 1 -
drivers/thermal/imx_sc_thermal.c | 1 -
drivers/thermal/imx_thermal.c | 2 +-
drivers/thermal/k3_bandgap.c | 2 +-
drivers/thermal/k3_j72xx_bandgap.c | 2 +-
drivers/thermal/mediatek/auxadc_thermal.c | 1 -
drivers/thermal/mediatek/lvts_thermal.c | 2 +-
drivers/thermal/qcom/qcom-spmi-adc-tm5.c | 1 -
drivers/thermal/qcom/qcom-spmi-temp-alarm.c | 1 -
drivers/thermal/rcar_gen3_thermal.c | 2 +-
drivers/thermal/rcar_thermal.c | 2 +-
drivers/thermal/rzg2l_thermal.c | 2 +-
drivers/thermal/samsung/exynos_tmu.c | 2 +-
drivers/thermal/sprd_thermal.c | 2 +-
drivers/thermal/st/stm_thermal.c | 2 --
drivers/thermal/sun8i_thermal.c | 2 +-
drivers/thermal/tegra/tegra30-tsensor.c | 2 +-
drivers/thermal/thermal_of.c | 3 +--
drivers/thermal/uniphier_thermal.c | 1 -
23 files changed, 15 insertions(+), 26 deletions(-)

diff --git a/drivers/thermal/amlogic_thermal.c b/drivers/thermal/amlogic_thermal.c
index 756b218880a7..81ebbf6de0de 100644
--- a/drivers/thermal/amlogic_thermal.c
+++ b/drivers/thermal/amlogic_thermal.c
@@ -22,8 +22,6 @@
#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/of.h>
-#include <linux/of_address.h>
-#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/thermal.h>
diff --git a/drivers/thermal/broadcom/bcm2711_thermal.c b/drivers/thermal/broadcom/bcm2711_thermal.c
index c243a76a3471..03ac2d02e9d4 100644
--- a/drivers/thermal/broadcom/bcm2711_thermal.c
+++ b/drivers/thermal/broadcom/bcm2711_thermal.c
@@ -15,8 +15,8 @@
#include <linux/kernel.h>
#include <linux/mfd/syscon.h>
#include <linux/module.h>
+#include <linux/of.h>
#include <linux/platform_device.h>
-#include <linux/of_device.h>
#include <linux/regmap.h>
#include <linux/thermal.h>

diff --git a/drivers/thermal/broadcom/brcmstb_thermal.c b/drivers/thermal/broadcom/brcmstb_thermal.c
index 72d1dbe60b8f..0b73abdaa792 100644
--- a/drivers/thermal/broadcom/brcmstb_thermal.c
+++ b/drivers/thermal/broadcom/brcmstb_thermal.c
@@ -17,8 +17,8 @@
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
+#include <linux/of.h>
#include <linux/platform_device.h>
-#include <linux/of_device.h>
#include <linux/thermal.h>

#define AVS_TMON_STATUS 0x00
diff --git a/drivers/thermal/hisi_thermal.c b/drivers/thermal/hisi_thermal.c
index 3f09ef8be41a..fb54ed4bf6f0 100644
--- a/drivers/thermal/hisi_thermal.c
+++ b/drivers/thermal/hisi_thermal.c
@@ -13,9 +13,9 @@
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/module.h>
+#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/io.h>
-#include <linux/of_device.h>
#include <linux/thermal.h>

#define HI6220_TEMP0_LAG (0x0)
diff --git a/drivers/thermal/imx8mm_thermal.c b/drivers/thermal/imx8mm_thermal.c
index d4b40869c7d7..e89b11b3f2b9 100644
--- a/drivers/thermal/imx8mm_thermal.c
+++ b/drivers/thermal/imx8mm_thermal.c
@@ -12,7 +12,6 @@
#include <linux/module.h>
#include <linux/nvmem-consumer.h>
#include <linux/of.h>
-#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/thermal.h>
diff --git a/drivers/thermal/imx_sc_thermal.c b/drivers/thermal/imx_sc_thermal.c
index 8d6b4ef23746..7224f8d21db9 100644
--- a/drivers/thermal/imx_sc_thermal.c
+++ b/drivers/thermal/imx_sc_thermal.c
@@ -8,7 +8,6 @@
#include <linux/firmware/imx/sci.h>
#include <linux/module.h>
#include <linux/of.h>
-#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/thermal.h>
diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c
index a94ec0a0c9dd..826358cbe810 100644
--- a/drivers/thermal/imx_thermal.c
+++ b/drivers/thermal/imx_thermal.c
@@ -11,7 +11,7 @@
#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/of.h>
-#include <linux/of_device.h>
+#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/thermal.h>
#include <linux/nvmem-consumer.h>
diff --git a/drivers/thermal/k3_bandgap.c b/drivers/thermal/k3_bandgap.c
index 1c3e590157ec..68f59b3735d3 100644
--- a/drivers/thermal/k3_bandgap.c
+++ b/drivers/thermal/k3_bandgap.c
@@ -11,7 +11,7 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
-#include <linux/of_platform.h>
+#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/thermal.h>
#include <linux/types.h>
diff --git a/drivers/thermal/k3_j72xx_bandgap.c b/drivers/thermal/k3_j72xx_bandgap.c
index 5be1f09eeb2c..a5a0fc9b9356 100644
--- a/drivers/thermal/k3_j72xx_bandgap.c
+++ b/drivers/thermal/k3_j72xx_bandgap.c
@@ -10,10 +10,10 @@
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
+#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/err.h>
#include <linux/types.h>
-#include <linux/of_platform.h>
#include <linux/io.h>
#include <linux/thermal.h>
#include <linux/of.h>
diff --git a/drivers/thermal/mediatek/auxadc_thermal.c b/drivers/thermal/mediatek/auxadc_thermal.c
index f59d36de20a0..c537aed71017 100644
--- a/drivers/thermal/mediatek/auxadc_thermal.c
+++ b/drivers/thermal/mediatek/auxadc_thermal.c
@@ -15,7 +15,6 @@
#include <linux/nvmem-consumer.h>
#include <linux/of.h>
#include <linux/of_address.h>
-#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/io.h>
diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c
index b693fac2d677..054c965ae5e1 100644
--- a/drivers/thermal/mediatek/lvts_thermal.c
+++ b/drivers/thermal/mediatek/lvts_thermal.c
@@ -13,7 +13,7 @@
#include <linux/iopoll.h>
#include <linux/kernel.h>
#include <linux/nvmem-consumer.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/reset.h>
#include <linux/thermal.h>
diff --git a/drivers/thermal/qcom/qcom-spmi-adc-tm5.c b/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
index 5ddc39b2be32..756ac6842ff9 100644
--- a/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
+++ b/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
@@ -14,7 +14,6 @@
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/of.h>
-#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/thermal.h>
diff --git a/drivers/thermal/qcom/qcom-spmi-temp-alarm.c b/drivers/thermal/qcom/qcom-spmi-temp-alarm.c
index 0e8ebfcd84c5..78c5cfe6a0c0 100644
--- a/drivers/thermal/qcom/qcom-spmi-temp-alarm.c
+++ b/drivers/thermal/qcom/qcom-spmi-temp-alarm.c
@@ -10,7 +10,6 @@
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/of.h>
-#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/thermal.h>
diff --git a/drivers/thermal/rcar_gen3_thermal.c b/drivers/thermal/rcar_gen3_thermal.c
index 9029d01e029b..bd2fb8c2e968 100644
--- a/drivers/thermal/rcar_gen3_thermal.c
+++ b/drivers/thermal/rcar_gen3_thermal.c
@@ -11,7 +11,7 @@
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/module.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/thermal.h>
diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
index b8571f7090aa..293f8dd9fe0a 100644
--- a/drivers/thermal/rcar_thermal.c
+++ b/drivers/thermal/rcar_thermal.c
@@ -11,7 +11,7 @@
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/module.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/reboot.h>
diff --git a/drivers/thermal/rzg2l_thermal.c b/drivers/thermal/rzg2l_thermal.c
index b56981f85306..6b2bf3426f52 100644
--- a/drivers/thermal/rzg2l_thermal.c
+++ b/drivers/thermal/rzg2l_thermal.c
@@ -9,8 +9,8 @@
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/math.h>
+#include <linux/mod_devicetable.h>
#include <linux/module.h>
-#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/reset.h>
diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
index 45e5c840d130..58f4d8f7a3fd 100644
--- a/drivers/thermal/samsung/exynos_tmu.c
+++ b/drivers/thermal/samsung/exynos_tmu.c
@@ -15,7 +15,7 @@
#include <linux/io.h>
#include <linux/interrupt.h>
#include <linux/module.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_irq.h>
#include <linux/platform_device.h>
diff --git a/drivers/thermal/sprd_thermal.c b/drivers/thermal/sprd_thermal.c
index 2fb90fdad76e..e27c4bdc8912 100644
--- a/drivers/thermal/sprd_thermal.c
+++ b/drivers/thermal/sprd_thermal.c
@@ -6,7 +6,7 @@
#include <linux/iopoll.h>
#include <linux/module.h>
#include <linux/nvmem-consumer.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/thermal.h>
diff --git a/drivers/thermal/st/stm_thermal.c b/drivers/thermal/st/stm_thermal.c
index 903fcf1763f1..142a7e5d12f4 100644
--- a/drivers/thermal/st/stm_thermal.c
+++ b/drivers/thermal/st/stm_thermal.c
@@ -14,8 +14,6 @@
#include <linux/iopoll.h>
#include <linux/module.h>
#include <linux/of.h>
-#include <linux/of_address.h>
-#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/thermal.h>

diff --git a/drivers/thermal/sun8i_thermal.c b/drivers/thermal/sun8i_thermal.c
index 195f3c5d0b38..cca16d632d9f 100644
--- a/drivers/thermal/sun8i_thermal.c
+++ b/drivers/thermal/sun8i_thermal.c
@@ -14,7 +14,7 @@
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/nvmem-consumer.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/reset.h>
diff --git a/drivers/thermal/tegra/tegra30-tsensor.c b/drivers/thermal/tegra/tegra30-tsensor.c
index c243e9d76d3c..d911fa60f100 100644
--- a/drivers/thermal/tegra/tegra30-tsensor.c
+++ b/drivers/thermal/tegra/tegra30-tsensor.c
@@ -18,7 +18,7 @@
#include <linux/iopoll.h>
#include <linux/math.h>
#include <linux/module.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pm.h>
#include <linux/reset.h>
diff --git a/drivers/thermal/thermal_of.c b/drivers/thermal/thermal_of.c
index 6fb14e521197..c36c7d235cba 100644
--- a/drivers/thermal/thermal_of.c
+++ b/drivers/thermal/thermal_of.c
@@ -10,8 +10,7 @@

#include <linux/err.h>
#include <linux/export.h>
-#include <linux/of_device.h>
-#include <linux/of_platform.h>
+#include <linux/of.h>
#include <linux/slab.h>
#include <linux/thermal.h>
#include <linux/types.h>
diff --git a/drivers/thermal/uniphier_thermal.c b/drivers/thermal/uniphier_thermal.c
index aef6119cc004..6f32ab61d174 100644
--- a/drivers/thermal/uniphier_thermal.c
+++ b/drivers/thermal/uniphier_thermal.c
@@ -12,7 +12,6 @@
#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/of.h>
-#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/thermal.h>
--
2.40.1



2023-07-14 19:05:31

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [PATCH] thermal: Explicitly include correct DT includes

On Fri, Jul 14, 2023 at 7:51 PM Rob Herring <[email protected]> wrote:
>
> 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 <[email protected]>

Acked-by: Rafael J. Wysocki <[email protected]>

or please let me know if you want me to pick this up.

Thanks!

> ---
> drivers/thermal/amlogic_thermal.c | 2 --
> drivers/thermal/broadcom/bcm2711_thermal.c | 2 +-
> drivers/thermal/broadcom/brcmstb_thermal.c | 2 +-
> drivers/thermal/hisi_thermal.c | 2 +-
> drivers/thermal/imx8mm_thermal.c | 1 -
> drivers/thermal/imx_sc_thermal.c | 1 -
> drivers/thermal/imx_thermal.c | 2 +-
> drivers/thermal/k3_bandgap.c | 2 +-
> drivers/thermal/k3_j72xx_bandgap.c | 2 +-
> drivers/thermal/mediatek/auxadc_thermal.c | 1 -
> drivers/thermal/mediatek/lvts_thermal.c | 2 +-
> drivers/thermal/qcom/qcom-spmi-adc-tm5.c | 1 -
> drivers/thermal/qcom/qcom-spmi-temp-alarm.c | 1 -
> drivers/thermal/rcar_gen3_thermal.c | 2 +-
> drivers/thermal/rcar_thermal.c | 2 +-
> drivers/thermal/rzg2l_thermal.c | 2 +-
> drivers/thermal/samsung/exynos_tmu.c | 2 +-
> drivers/thermal/sprd_thermal.c | 2 +-
> drivers/thermal/st/stm_thermal.c | 2 --
> drivers/thermal/sun8i_thermal.c | 2 +-
> drivers/thermal/tegra/tegra30-tsensor.c | 2 +-
> drivers/thermal/thermal_of.c | 3 +--
> drivers/thermal/uniphier_thermal.c | 1 -
> 23 files changed, 15 insertions(+), 26 deletions(-)
>
> diff --git a/drivers/thermal/amlogic_thermal.c b/drivers/thermal/amlogic_thermal.c
> index 756b218880a7..81ebbf6de0de 100644
> --- a/drivers/thermal/amlogic_thermal.c
> +++ b/drivers/thermal/amlogic_thermal.c
> @@ -22,8 +22,6 @@
> #include <linux/mfd/syscon.h>
> #include <linux/module.h>
> #include <linux/of.h>
> -#include <linux/of_address.h>
> -#include <linux/of_device.h>
> #include <linux/platform_device.h>
> #include <linux/regmap.h>
> #include <linux/thermal.h>
> diff --git a/drivers/thermal/broadcom/bcm2711_thermal.c b/drivers/thermal/broadcom/bcm2711_thermal.c
> index c243a76a3471..03ac2d02e9d4 100644
> --- a/drivers/thermal/broadcom/bcm2711_thermal.c
> +++ b/drivers/thermal/broadcom/bcm2711_thermal.c
> @@ -15,8 +15,8 @@
> #include <linux/kernel.h>
> #include <linux/mfd/syscon.h>
> #include <linux/module.h>
> +#include <linux/of.h>
> #include <linux/platform_device.h>
> -#include <linux/of_device.h>
> #include <linux/regmap.h>
> #include <linux/thermal.h>
>
> diff --git a/drivers/thermal/broadcom/brcmstb_thermal.c b/drivers/thermal/broadcom/brcmstb_thermal.c
> index 72d1dbe60b8f..0b73abdaa792 100644
> --- a/drivers/thermal/broadcom/brcmstb_thermal.c
> +++ b/drivers/thermal/broadcom/brcmstb_thermal.c
> @@ -17,8 +17,8 @@
> #include <linux/interrupt.h>
> #include <linux/kernel.h>
> #include <linux/module.h>
> +#include <linux/of.h>
> #include <linux/platform_device.h>
> -#include <linux/of_device.h>
> #include <linux/thermal.h>
>
> #define AVS_TMON_STATUS 0x00
> diff --git a/drivers/thermal/hisi_thermal.c b/drivers/thermal/hisi_thermal.c
> index 3f09ef8be41a..fb54ed4bf6f0 100644
> --- a/drivers/thermal/hisi_thermal.c
> +++ b/drivers/thermal/hisi_thermal.c
> @@ -13,9 +13,9 @@
> #include <linux/delay.h>
> #include <linux/interrupt.h>
> #include <linux/module.h>
> +#include <linux/of.h>
> #include <linux/platform_device.h>
> #include <linux/io.h>
> -#include <linux/of_device.h>
> #include <linux/thermal.h>
>
> #define HI6220_TEMP0_LAG (0x0)
> diff --git a/drivers/thermal/imx8mm_thermal.c b/drivers/thermal/imx8mm_thermal.c
> index d4b40869c7d7..e89b11b3f2b9 100644
> --- a/drivers/thermal/imx8mm_thermal.c
> +++ b/drivers/thermal/imx8mm_thermal.c
> @@ -12,7 +12,6 @@
> #include <linux/module.h>
> #include <linux/nvmem-consumer.h>
> #include <linux/of.h>
> -#include <linux/of_device.h>
> #include <linux/platform_device.h>
> #include <linux/slab.h>
> #include <linux/thermal.h>
> diff --git a/drivers/thermal/imx_sc_thermal.c b/drivers/thermal/imx_sc_thermal.c
> index 8d6b4ef23746..7224f8d21db9 100644
> --- a/drivers/thermal/imx_sc_thermal.c
> +++ b/drivers/thermal/imx_sc_thermal.c
> @@ -8,7 +8,6 @@
> #include <linux/firmware/imx/sci.h>
> #include <linux/module.h>
> #include <linux/of.h>
> -#include <linux/of_device.h>
> #include <linux/platform_device.h>
> #include <linux/slab.h>
> #include <linux/thermal.h>
> diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c
> index a94ec0a0c9dd..826358cbe810 100644
> --- a/drivers/thermal/imx_thermal.c
> +++ b/drivers/thermal/imx_thermal.c
> @@ -11,7 +11,7 @@
> #include <linux/mfd/syscon.h>
> #include <linux/module.h>
> #include <linux/of.h>
> -#include <linux/of_device.h>
> +#include <linux/platform_device.h>
> #include <linux/regmap.h>
> #include <linux/thermal.h>
> #include <linux/nvmem-consumer.h>
> diff --git a/drivers/thermal/k3_bandgap.c b/drivers/thermal/k3_bandgap.c
> index 1c3e590157ec..68f59b3735d3 100644
> --- a/drivers/thermal/k3_bandgap.c
> +++ b/drivers/thermal/k3_bandgap.c
> @@ -11,7 +11,7 @@
> #include <linux/kernel.h>
> #include <linux/module.h>
> #include <linux/of.h>
> -#include <linux/of_platform.h>
> +#include <linux/platform_device.h>
> #include <linux/pm_runtime.h>
> #include <linux/thermal.h>
> #include <linux/types.h>
> diff --git a/drivers/thermal/k3_j72xx_bandgap.c b/drivers/thermal/k3_j72xx_bandgap.c
> index 5be1f09eeb2c..a5a0fc9b9356 100644
> --- a/drivers/thermal/k3_j72xx_bandgap.c
> +++ b/drivers/thermal/k3_j72xx_bandgap.c
> @@ -10,10 +10,10 @@
> #include <linux/module.h>
> #include <linux/init.h>
> #include <linux/kernel.h>
> +#include <linux/platform_device.h>
> #include <linux/pm_runtime.h>
> #include <linux/err.h>
> #include <linux/types.h>
> -#include <linux/of_platform.h>
> #include <linux/io.h>
> #include <linux/thermal.h>
> #include <linux/of.h>
> diff --git a/drivers/thermal/mediatek/auxadc_thermal.c b/drivers/thermal/mediatek/auxadc_thermal.c
> index f59d36de20a0..c537aed71017 100644
> --- a/drivers/thermal/mediatek/auxadc_thermal.c
> +++ b/drivers/thermal/mediatek/auxadc_thermal.c
> @@ -15,7 +15,6 @@
> #include <linux/nvmem-consumer.h>
> #include <linux/of.h>
> #include <linux/of_address.h>
> -#include <linux/of_device.h>
> #include <linux/platform_device.h>
> #include <linux/slab.h>
> #include <linux/io.h>
> diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c
> index b693fac2d677..054c965ae5e1 100644
> --- a/drivers/thermal/mediatek/lvts_thermal.c
> +++ b/drivers/thermal/mediatek/lvts_thermal.c
> @@ -13,7 +13,7 @@
> #include <linux/iopoll.h>
> #include <linux/kernel.h>
> #include <linux/nvmem-consumer.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
> #include <linux/platform_device.h>
> #include <linux/reset.h>
> #include <linux/thermal.h>
> diff --git a/drivers/thermal/qcom/qcom-spmi-adc-tm5.c b/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
> index 5ddc39b2be32..756ac6842ff9 100644
> --- a/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
> +++ b/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
> @@ -14,7 +14,6 @@
> #include <linux/interrupt.h>
> #include <linux/module.h>
> #include <linux/of.h>
> -#include <linux/of_device.h>
> #include <linux/platform_device.h>
> #include <linux/regmap.h>
> #include <linux/thermal.h>
> diff --git a/drivers/thermal/qcom/qcom-spmi-temp-alarm.c b/drivers/thermal/qcom/qcom-spmi-temp-alarm.c
> index 0e8ebfcd84c5..78c5cfe6a0c0 100644
> --- a/drivers/thermal/qcom/qcom-spmi-temp-alarm.c
> +++ b/drivers/thermal/qcom/qcom-spmi-temp-alarm.c
> @@ -10,7 +10,6 @@
> #include <linux/interrupt.h>
> #include <linux/module.h>
> #include <linux/of.h>
> -#include <linux/of_device.h>
> #include <linux/platform_device.h>
> #include <linux/regmap.h>
> #include <linux/thermal.h>
> diff --git a/drivers/thermal/rcar_gen3_thermal.c b/drivers/thermal/rcar_gen3_thermal.c
> index 9029d01e029b..bd2fb8c2e968 100644
> --- a/drivers/thermal/rcar_gen3_thermal.c
> +++ b/drivers/thermal/rcar_gen3_thermal.c
> @@ -11,7 +11,7 @@
> #include <linux/interrupt.h>
> #include <linux/io.h>
> #include <linux/module.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
> #include <linux/platform_device.h>
> #include <linux/pm_runtime.h>
> #include <linux/thermal.h>
> diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
> index b8571f7090aa..293f8dd9fe0a 100644
> --- a/drivers/thermal/rcar_thermal.c
> +++ b/drivers/thermal/rcar_thermal.c
> @@ -11,7 +11,7 @@
> #include <linux/interrupt.h>
> #include <linux/io.h>
> #include <linux/module.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
> #include <linux/platform_device.h>
> #include <linux/pm_runtime.h>
> #include <linux/reboot.h>
> diff --git a/drivers/thermal/rzg2l_thermal.c b/drivers/thermal/rzg2l_thermal.c
> index b56981f85306..6b2bf3426f52 100644
> --- a/drivers/thermal/rzg2l_thermal.c
> +++ b/drivers/thermal/rzg2l_thermal.c
> @@ -9,8 +9,8 @@
> #include <linux/io.h>
> #include <linux/iopoll.h>
> #include <linux/math.h>
> +#include <linux/mod_devicetable.h>
> #include <linux/module.h>
> -#include <linux/of_device.h>
> #include <linux/platform_device.h>
> #include <linux/pm_runtime.h>
> #include <linux/reset.h>
> diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
> index 45e5c840d130..58f4d8f7a3fd 100644
> --- a/drivers/thermal/samsung/exynos_tmu.c
> +++ b/drivers/thermal/samsung/exynos_tmu.c
> @@ -15,7 +15,7 @@
> #include <linux/io.h>
> #include <linux/interrupt.h>
> #include <linux/module.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
> #include <linux/of_address.h>
> #include <linux/of_irq.h>
> #include <linux/platform_device.h>
> diff --git a/drivers/thermal/sprd_thermal.c b/drivers/thermal/sprd_thermal.c
> index 2fb90fdad76e..e27c4bdc8912 100644
> --- a/drivers/thermal/sprd_thermal.c
> +++ b/drivers/thermal/sprd_thermal.c
> @@ -6,7 +6,7 @@
> #include <linux/iopoll.h>
> #include <linux/module.h>
> #include <linux/nvmem-consumer.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
> #include <linux/platform_device.h>
> #include <linux/slab.h>
> #include <linux/thermal.h>
> diff --git a/drivers/thermal/st/stm_thermal.c b/drivers/thermal/st/stm_thermal.c
> index 903fcf1763f1..142a7e5d12f4 100644
> --- a/drivers/thermal/st/stm_thermal.c
> +++ b/drivers/thermal/st/stm_thermal.c
> @@ -14,8 +14,6 @@
> #include <linux/iopoll.h>
> #include <linux/module.h>
> #include <linux/of.h>
> -#include <linux/of_address.h>
> -#include <linux/of_device.h>
> #include <linux/platform_device.h>
> #include <linux/thermal.h>
>
> diff --git a/drivers/thermal/sun8i_thermal.c b/drivers/thermal/sun8i_thermal.c
> index 195f3c5d0b38..cca16d632d9f 100644
> --- a/drivers/thermal/sun8i_thermal.c
> +++ b/drivers/thermal/sun8i_thermal.c
> @@ -14,7 +14,7 @@
> #include <linux/interrupt.h>
> #include <linux/module.h>
> #include <linux/nvmem-consumer.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
> #include <linux/platform_device.h>
> #include <linux/regmap.h>
> #include <linux/reset.h>
> diff --git a/drivers/thermal/tegra/tegra30-tsensor.c b/drivers/thermal/tegra/tegra30-tsensor.c
> index c243e9d76d3c..d911fa60f100 100644
> --- a/drivers/thermal/tegra/tegra30-tsensor.c
> +++ b/drivers/thermal/tegra/tegra30-tsensor.c
> @@ -18,7 +18,7 @@
> #include <linux/iopoll.h>
> #include <linux/math.h>
> #include <linux/module.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
> #include <linux/platform_device.h>
> #include <linux/pm.h>
> #include <linux/reset.h>
> diff --git a/drivers/thermal/thermal_of.c b/drivers/thermal/thermal_of.c
> index 6fb14e521197..c36c7d235cba 100644
> --- a/drivers/thermal/thermal_of.c
> +++ b/drivers/thermal/thermal_of.c
> @@ -10,8 +10,7 @@
>
> #include <linux/err.h>
> #include <linux/export.h>
> -#include <linux/of_device.h>
> -#include <linux/of_platform.h>
> +#include <linux/of.h>
> #include <linux/slab.h>
> #include <linux/thermal.h>
> #include <linux/types.h>
> diff --git a/drivers/thermal/uniphier_thermal.c b/drivers/thermal/uniphier_thermal.c
> index aef6119cc004..6f32ab61d174 100644
> --- a/drivers/thermal/uniphier_thermal.c
> +++ b/drivers/thermal/uniphier_thermal.c
> @@ -12,7 +12,6 @@
> #include <linux/mfd/syscon.h>
> #include <linux/module.h>
> #include <linux/of.h>
> -#include <linux/of_device.h>
> #include <linux/platform_device.h>
> #include <linux/regmap.h>
> #include <linux/thermal.h>
> --
> 2.40.1
>

2023-07-14 20:07:46

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH] thermal: Explicitly include correct DT includes

On Fri, Jul 14, 2023 at 12:54 PM Rafael J. Wysocki <[email protected]> wrote:
>
> On Fri, Jul 14, 2023 at 7:51 PM Rob Herring <[email protected]> wrote:
> >
> > 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 <[email protected]>
>
> Acked-by: Rafael J. Wysocki <[email protected]>
>
> or please let me know if you want me to pick this up.

Single patch in your subsystem with no dependencies. Please pick it up.

Rob

2023-07-17 12:14:01

by Alim Akhtar

[permalink] [raw]
Subject: RE: [PATCH] thermal: Explicitly include correct DT includes



> -----Original Message-----
> From: Rob Herring <[email protected]>
> Sent: Friday, July 14, 2023 11:20 PM
> To: Guillaume La Roque <[email protected]>; Rafael J. Wysocki
> <[email protected]>; Daniel Lezcano <[email protected]>; Amit
> Kucheria <[email protected]>; Zhang Rui <[email protected]>; Florian Fainelli
> <[email protected]>; Broadcom internal kernel review list <bcm-
> [email protected]>; Markus Mayer
> <[email protected]>; Shawn Guo <[email protected]>; Sascha
> Hauer <[email protected]>; Pengutronix Kernel Team
> <[email protected]>; Fabio Estevam <[email protected]>; NXP Linux
> Team <[email protected]>; Andy Gross <[email protected]>; Bjorn Andersson
> <[email protected]>; Konrad Dybcio <[email protected]>; Thara
> Gopinath <[email protected]>; Niklas Söderlund
> <[email protected]>; Bartlomiej Zolnierkiewicz
> <[email protected]>; Krzysztof Kozlowski <[email protected]>;
> Alim Akhtar <[email protected]>; Orson Zhai <[email protected]>;
> Baolin Wang <[email protected]>; Chunyan Zhang
> <[email protected]>; Maxime Coquelin <[email protected]>;
> Alexandre Torgue <[email protected]>; Vasily Khoruzhick
> <[email protected]>; Yangtao Li <[email protected]>; Chen-Yu Tsai
> <[email protected]>; Jernej Skrabec <[email protected]>; Samuel Holland
> <[email protected]>; Thierry Reding <[email protected]>; Jonathan
> Hunter <[email protected]>; Kunihiko Hayashi
> <[email protected]>; Masami Hiramatsu
> <[email protected]>; Matthias Brugger <[email protected]>;
> AngeloGioacchino Del Regno <[email protected]>
> Cc: [email protected]; [email protected]; linux-
> [email protected]; [email protected]; linux-rpi-
> [email protected]; [email protected]; linux-arm-
> [email protected]; [email protected]; linux-samsung-
> [email protected]; [email protected]; linux-
> [email protected]; [email protected]; linux-
> [email protected]
> Subject: [PATCH] thermal: 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 <[email protected]>
> ---
> drivers/thermal/amlogic_thermal.c | 2 --
> drivers/thermal/broadcom/bcm2711_thermal.c | 2 +-
> drivers/thermal/broadcom/brcmstb_thermal.c | 2 +-
> drivers/thermal/hisi_thermal.c | 2 +-
> drivers/thermal/imx8mm_thermal.c | 1 -
> drivers/thermal/imx_sc_thermal.c | 1 -
> drivers/thermal/imx_thermal.c | 2 +-
> drivers/thermal/k3_bandgap.c | 2 +-
> drivers/thermal/k3_j72xx_bandgap.c | 2 +-
> drivers/thermal/mediatek/auxadc_thermal.c | 1 -
> drivers/thermal/mediatek/lvts_thermal.c | 2 +-
> drivers/thermal/qcom/qcom-spmi-adc-tm5.c | 1 -
> drivers/thermal/qcom/qcom-spmi-temp-alarm.c | 1 -
> drivers/thermal/rcar_gen3_thermal.c | 2 +-
> drivers/thermal/rcar_thermal.c | 2 +-
> drivers/thermal/rzg2l_thermal.c | 2 +-
> drivers/thermal/samsung/exynos_tmu.c | 2 +-

For Samsung/ Exynos

Reviewed-by: Alim Akhtar <[email protected]>

> drivers/thermal/sprd_thermal.c | 2 +-
> drivers/thermal/st/stm_thermal.c | 2 --
> drivers/thermal/sun8i_thermal.c | 2 +-
> drivers/thermal/tegra/tegra30-tsensor.c | 2 +-
> drivers/thermal/thermal_of.c | 3 +--
> drivers/thermal/uniphier_thermal.c | 1 -
> 23 files changed, 15 insertions(+), 26 deletions(-)
>
> diff --git a/drivers/thermal/amlogic_thermal.c
> b/drivers/thermal/amlogic_thermal.c
> index 756b218880a7..81ebbf6de0de 100644
> --- a/drivers/thermal/amlogic_thermal.c
> +++ b/drivers/thermal/amlogic_thermal.c
> @@ -22,8 +22,6 @@
> #include <linux/mfd/syscon.h>
> #include <linux/module.h>
> #include <linux/of.h>
> -#include <linux/of_address.h>
> -#include <linux/of_device.h>
> #include <linux/platform_device.h>
> #include <linux/regmap.h>
> #include <linux/thermal.h>
> diff --git a/drivers/thermal/broadcom/bcm2711_thermal.c
> b/drivers/thermal/broadcom/bcm2711_thermal.c
> index c243a76a3471..03ac2d02e9d4 100644
> --- a/drivers/thermal/broadcom/bcm2711_thermal.c
> +++ b/drivers/thermal/broadcom/bcm2711_thermal.c
> @@ -15,8 +15,8 @@
> #include <linux/kernel.h>
> #include <linux/mfd/syscon.h>
> #include <linux/module.h>
> +#include <linux/of.h>
> #include <linux/platform_device.h>
> -#include <linux/of_device.h>
> #include <linux/regmap.h>
> #include <linux/thermal.h>
>
> diff --git a/drivers/thermal/broadcom/brcmstb_thermal.c
> b/drivers/thermal/broadcom/brcmstb_thermal.c
> index 72d1dbe60b8f..0b73abdaa792 100644
> --- a/drivers/thermal/broadcom/brcmstb_thermal.c
> +++ b/drivers/thermal/broadcom/brcmstb_thermal.c
> @@ -17,8 +17,8 @@
> #include <linux/interrupt.h>
> #include <linux/kernel.h>
> #include <linux/module.h>
> +#include <linux/of.h>
> #include <linux/platform_device.h>
> -#include <linux/of_device.h>
> #include <linux/thermal.h>
>
> #define AVS_TMON_STATUS 0x00
> diff --git a/drivers/thermal/hisi_thermal.c b/drivers/thermal/hisi_thermal.c
> index 3f09ef8be41a..fb54ed4bf6f0 100644
> --- a/drivers/thermal/hisi_thermal.c
> +++ b/drivers/thermal/hisi_thermal.c
> @@ -13,9 +13,9 @@
> #include <linux/delay.h>
> #include <linux/interrupt.h>
> #include <linux/module.h>
> +#include <linux/of.h>
> #include <linux/platform_device.h>
> #include <linux/io.h>
> -#include <linux/of_device.h>
> #include <linux/thermal.h>
>
> #define HI6220_TEMP0_LAG (0x0)
> diff --git a/drivers/thermal/imx8mm_thermal.c
> b/drivers/thermal/imx8mm_thermal.c
> index d4b40869c7d7..e89b11b3f2b9 100644
> --- a/drivers/thermal/imx8mm_thermal.c
> +++ b/drivers/thermal/imx8mm_thermal.c
> @@ -12,7 +12,6 @@
> #include <linux/module.h>
> #include <linux/nvmem-consumer.h>
> #include <linux/of.h>
> -#include <linux/of_device.h>
> #include <linux/platform_device.h>
> #include <linux/slab.h>
> #include <linux/thermal.h>
> diff --git a/drivers/thermal/imx_sc_thermal.c
> b/drivers/thermal/imx_sc_thermal.c
> index 8d6b4ef23746..7224f8d21db9 100644
> --- a/drivers/thermal/imx_sc_thermal.c
> +++ b/drivers/thermal/imx_sc_thermal.c
> @@ -8,7 +8,6 @@
> #include <linux/firmware/imx/sci.h>
> #include <linux/module.h>
> #include <linux/of.h>
> -#include <linux/of_device.h>
> #include <linux/platform_device.h>
> #include <linux/slab.h>
> #include <linux/thermal.h>
> diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c
> index a94ec0a0c9dd..826358cbe810 100644
> --- a/drivers/thermal/imx_thermal.c
> +++ b/drivers/thermal/imx_thermal.c
> @@ -11,7 +11,7 @@
> #include <linux/mfd/syscon.h>
> #include <linux/module.h>
> #include <linux/of.h>
> -#include <linux/of_device.h>
> +#include <linux/platform_device.h>
> #include <linux/regmap.h>
> #include <linux/thermal.h>
> #include <linux/nvmem-consumer.h>
> diff --git a/drivers/thermal/k3_bandgap.c b/drivers/thermal/k3_bandgap.c index
> 1c3e590157ec..68f59b3735d3 100644
> --- a/drivers/thermal/k3_bandgap.c
> +++ b/drivers/thermal/k3_bandgap.c
> @@ -11,7 +11,7 @@
> #include <linux/kernel.h>
> #include <linux/module.h>
> #include <linux/of.h>
> -#include <linux/of_platform.h>
> +#include <linux/platform_device.h>
> #include <linux/pm_runtime.h>
> #include <linux/thermal.h>
> #include <linux/types.h>
> diff --git a/drivers/thermal/k3_j72xx_bandgap.c
> b/drivers/thermal/k3_j72xx_bandgap.c
> index 5be1f09eeb2c..a5a0fc9b9356 100644
> --- a/drivers/thermal/k3_j72xx_bandgap.c
> +++ b/drivers/thermal/k3_j72xx_bandgap.c
> @@ -10,10 +10,10 @@
> #include <linux/module.h>
> #include <linux/init.h>
> #include <linux/kernel.h>
> +#include <linux/platform_device.h>
> #include <linux/pm_runtime.h>
> #include <linux/err.h>
> #include <linux/types.h>
> -#include <linux/of_platform.h>
> #include <linux/io.h>
> #include <linux/thermal.h>
> #include <linux/of.h>
> diff --git a/drivers/thermal/mediatek/auxadc_thermal.c
> b/drivers/thermal/mediatek/auxadc_thermal.c
> index f59d36de20a0..c537aed71017 100644
> --- a/drivers/thermal/mediatek/auxadc_thermal.c
> +++ b/drivers/thermal/mediatek/auxadc_thermal.c
> @@ -15,7 +15,6 @@
> #include <linux/nvmem-consumer.h>
> #include <linux/of.h>
> #include <linux/of_address.h>
> -#include <linux/of_device.h>
> #include <linux/platform_device.h>
> #include <linux/slab.h>
> #include <linux/io.h>
> diff --git a/drivers/thermal/mediatek/lvts_thermal.c
> b/drivers/thermal/mediatek/lvts_thermal.c
> index b693fac2d677..054c965ae5e1 100644
> --- a/drivers/thermal/mediatek/lvts_thermal.c
> +++ b/drivers/thermal/mediatek/lvts_thermal.c
> @@ -13,7 +13,7 @@
> #include <linux/iopoll.h>
> #include <linux/kernel.h>
> #include <linux/nvmem-consumer.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
> #include <linux/platform_device.h>
> #include <linux/reset.h>
> #include <linux/thermal.h>
> diff --git a/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
> b/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
> index 5ddc39b2be32..756ac6842ff9 100644
> --- a/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
> +++ b/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
> @@ -14,7 +14,6 @@
> #include <linux/interrupt.h>
> #include <linux/module.h>
> #include <linux/of.h>
> -#include <linux/of_device.h>
> #include <linux/platform_device.h>
> #include <linux/regmap.h>
> #include <linux/thermal.h>
> diff --git a/drivers/thermal/qcom/qcom-spmi-temp-alarm.c
> b/drivers/thermal/qcom/qcom-spmi-temp-alarm.c
> index 0e8ebfcd84c5..78c5cfe6a0c0 100644
> --- a/drivers/thermal/qcom/qcom-spmi-temp-alarm.c
> +++ b/drivers/thermal/qcom/qcom-spmi-temp-alarm.c
> @@ -10,7 +10,6 @@
> #include <linux/interrupt.h>
> #include <linux/module.h>
> #include <linux/of.h>
> -#include <linux/of_device.h>
> #include <linux/platform_device.h>
> #include <linux/regmap.h>
> #include <linux/thermal.h>
> diff --git a/drivers/thermal/rcar_gen3_thermal.c
> b/drivers/thermal/rcar_gen3_thermal.c
> index 9029d01e029b..bd2fb8c2e968 100644
> --- a/drivers/thermal/rcar_gen3_thermal.c
> +++ b/drivers/thermal/rcar_gen3_thermal.c
> @@ -11,7 +11,7 @@
> #include <linux/interrupt.h>
> #include <linux/io.h>
> #include <linux/module.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
> #include <linux/platform_device.h>
> #include <linux/pm_runtime.h>
> #include <linux/thermal.h>
> diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
> index b8571f7090aa..293f8dd9fe0a 100644
> --- a/drivers/thermal/rcar_thermal.c
> +++ b/drivers/thermal/rcar_thermal.c
> @@ -11,7 +11,7 @@
> #include <linux/interrupt.h>
> #include <linux/io.h>
> #include <linux/module.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
> #include <linux/platform_device.h>
> #include <linux/pm_runtime.h>
> #include <linux/reboot.h>
> diff --git a/drivers/thermal/rzg2l_thermal.c b/drivers/thermal/rzg2l_thermal.c
> index b56981f85306..6b2bf3426f52 100644
> --- a/drivers/thermal/rzg2l_thermal.c
> +++ b/drivers/thermal/rzg2l_thermal.c
> @@ -9,8 +9,8 @@
> #include <linux/io.h>
> #include <linux/iopoll.h>
> #include <linux/math.h>
> +#include <linux/mod_devicetable.h>
> #include <linux/module.h>
> -#include <linux/of_device.h>
> #include <linux/platform_device.h>
> #include <linux/pm_runtime.h>
> #include <linux/reset.h>
> diff --git a/drivers/thermal/samsung/exynos_tmu.c
> b/drivers/thermal/samsung/exynos_tmu.c
> index 45e5c840d130..58f4d8f7a3fd 100644
> --- a/drivers/thermal/samsung/exynos_tmu.c
> +++ b/drivers/thermal/samsung/exynos_tmu.c
> @@ -15,7 +15,7 @@
> #include <linux/io.h>
> #include <linux/interrupt.h>
> #include <linux/module.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
> #include <linux/of_address.h>
> #include <linux/of_irq.h>
> #include <linux/platform_device.h>
> diff --git a/drivers/thermal/sprd_thermal.c b/drivers/thermal/sprd_thermal.c
> index 2fb90fdad76e..e27c4bdc8912 100644
> --- a/drivers/thermal/sprd_thermal.c
> +++ b/drivers/thermal/sprd_thermal.c
> @@ -6,7 +6,7 @@
> #include <linux/iopoll.h>
> #include <linux/module.h>
> #include <linux/nvmem-consumer.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
> #include <linux/platform_device.h>
> #include <linux/slab.h>
> #include <linux/thermal.h>
> diff --git a/drivers/thermal/st/stm_thermal.c
> b/drivers/thermal/st/stm_thermal.c
> index 903fcf1763f1..142a7e5d12f4 100644
> --- a/drivers/thermal/st/stm_thermal.c
> +++ b/drivers/thermal/st/stm_thermal.c
> @@ -14,8 +14,6 @@
> #include <linux/iopoll.h>
> #include <linux/module.h>
> #include <linux/of.h>
> -#include <linux/of_address.h>
> -#include <linux/of_device.h>
> #include <linux/platform_device.h>
> #include <linux/thermal.h>
>
> diff --git a/drivers/thermal/sun8i_thermal.c b/drivers/thermal/sun8i_thermal.c
> index 195f3c5d0b38..cca16d632d9f 100644
> --- a/drivers/thermal/sun8i_thermal.c
> +++ b/drivers/thermal/sun8i_thermal.c
> @@ -14,7 +14,7 @@
> #include <linux/interrupt.h>
> #include <linux/module.h>
> #include <linux/nvmem-consumer.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
> #include <linux/platform_device.h>
> #include <linux/regmap.h>
> #include <linux/reset.h>
> diff --git a/drivers/thermal/tegra/tegra30-tsensor.c
> b/drivers/thermal/tegra/tegra30-tsensor.c
> index c243e9d76d3c..d911fa60f100 100644
> --- a/drivers/thermal/tegra/tegra30-tsensor.c
> +++ b/drivers/thermal/tegra/tegra30-tsensor.c
> @@ -18,7 +18,7 @@
> #include <linux/iopoll.h>
> #include <linux/math.h>
> #include <linux/module.h>
> -#include <linux/of_device.h>
> +#include <linux/of.h>
> #include <linux/platform_device.h>
> #include <linux/pm.h>
> #include <linux/reset.h>
> diff --git a/drivers/thermal/thermal_of.c b/drivers/thermal/thermal_of.c index
> 6fb14e521197..c36c7d235cba 100644
> --- a/drivers/thermal/thermal_of.c
> +++ b/drivers/thermal/thermal_of.c
> @@ -10,8 +10,7 @@
>
> #include <linux/err.h>
> #include <linux/export.h>
> -#include <linux/of_device.h>
> -#include <linux/of_platform.h>
> +#include <linux/of.h>
> #include <linux/slab.h>
> #include <linux/thermal.h>
> #include <linux/types.h>
> diff --git a/drivers/thermal/uniphier_thermal.c
> b/drivers/thermal/uniphier_thermal.c
> index aef6119cc004..6f32ab61d174 100644
> --- a/drivers/thermal/uniphier_thermal.c
> +++ b/drivers/thermal/uniphier_thermal.c
> @@ -12,7 +12,6 @@
> #include <linux/mfd/syscon.h>
> #include <linux/module.h>
> #include <linux/of.h>
> -#include <linux/of_device.h>
> #include <linux/platform_device.h>
> #include <linux/regmap.h>
> #include <linux/thermal.h>
> --
> 2.40.1




2023-07-20 19:09:51

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [PATCH] thermal: Explicitly include correct DT includes

On Fri, Jul 14, 2023 at 9:53 PM Rob Herring <[email protected]> wrote:
>
> On Fri, Jul 14, 2023 at 12:54 PM Rafael J. Wysocki <[email protected]> wrote:
> >
> > On Fri, Jul 14, 2023 at 7:51 PM Rob Herring <[email protected]> wrote:
> > >
> > > 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 <[email protected]>
> >
> > Acked-by: Rafael J. Wysocki <[email protected]>
> >
> > or please let me know if you want me to pick this up.
>
> Single patch in your subsystem with no dependencies. Please pick it up.

Done, thanks!

2023-08-23 07:43:03

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH] thermal: Explicitly include correct DT includes

On Thu, Jul 20, 2023 at 1:50 PM Rafael J. Wysocki <[email protected]> wrote:
>
> On Fri, Jul 14, 2023 at 9:53 PM Rob Herring <[email protected]> wrote:
> >
> > On Fri, Jul 14, 2023 at 12:54 PM Rafael J. Wysocki <[email protected]> wrote:
> > >
> > > On Fri, Jul 14, 2023 at 7:51 PM Rob Herring <[email protected]> wrote:
> > > >
> > > > 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 <[email protected]>
> > >
> > > Acked-by: Rafael J. Wysocki <[email protected]>
> > >
> > > or please let me know if you want me to pick this up.
> >
> > Single patch in your subsystem with no dependencies. Please pick it up.
>
> Done, thanks!

I'm not seeing this in linux-next.

Rob

2023-08-23 18:28:01

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [PATCH] thermal: Explicitly include correct DT includes

On Wed, Aug 23, 2023 at 12:38 AM Rob Herring <[email protected]> wrote:
>
> On Thu, Jul 20, 2023 at 1:50 PM Rafael J. Wysocki <[email protected]> wrote:
> >
> > On Fri, Jul 14, 2023 at 9:53 PM Rob Herring <[email protected]> wrote:
> > >
> > > On Fri, Jul 14, 2023 at 12:54 PM Rafael J. Wysocki <[email protected]> wrote:
> > > >
> > > > On Fri, Jul 14, 2023 at 7:51 PM Rob Herring <[email protected]> wrote:
> > > > >
> > > > > 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 <[email protected]>
> > > >
> > > > Acked-by: Rafael J. Wysocki <[email protected]>
> > > >
> > > > or please let me know if you want me to pick this up.
> > >
> > > Single patch in your subsystem with no dependencies. Please pick it up.
> >
> > Done, thanks!
>
> I'm not seeing this in linux-next.

f6a756e8fb12 thermal: Explicitly include correct DT includes

It's there in my linux-next branch (and in my thermal branch) and it
should be there in linux-next too.