watchdog: Explicitly include correct DT includes
Subsystems (13)
PATCH 1/1 watchdog: 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.
--- drivers/watchdog/armada_37xx_wdt.c | 1 - drivers/watchdog/at91rm9200_wdt.c | 3 +-- drivers/watchdog/cpwd.c | 2 +- drivers/watchdog/ftwdt010_wdt.c | 6 ++---- drivers/watchdog/imx2_wdt.c | 3 +-- drivers/watchdog/imx7ulp_wdt.c | 1 - drivers/watchdog/meson_wdt.c | 4 ++-- drivers/watchdog/mtk_wdt.c | 1 - drivers/watchdog/of_xilinx_wdt.c | 3 +-- drivers/watchdog/pic32-dmt.c | 3 +-- drivers/watchdog/pic32-wdt.c | 3 +-- drivers/watchdog/pika_wdt.c | 2 +- drivers/watchdog/qcom-wdt.c | 1 - drivers/watchdog/rave-sp-wdt.c | 2 +- drivers/watchdog/riowd.c | 2 +- drivers/watchdog/rza_wdt.c | 4 ++-- drivers/watchdog/rzg2l_wdt.c | 2 +- drivers/watchdog/s3c2410_wdt.c | 1 - drivers/watchdog/sama5d4_wdt.c | 1 - drivers/watchdog/sbsa_gwdt.c | 3 +-- drivers/watchdog/starfive-wdt.c | 3 ++- drivers/watchdog/stm32_iwdg.c | 1 - drivers/watchdog/sunxi_wdt.c | 1 - drivers/watchdog/xilinx_wwdt.c | 4 ++-- 24 files changed, 21 insertions(+), 36 deletions(-)
drivers/watchdog/armada_37xx_wdt.c +0 -1
@@ -14,7 +14,6 @@#include <linux/module.h> #include <linux/moduleparam.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/regmap.h> #include <linux/types.h>
drivers/watchdog/at91rm9200_wdt.c +1 -2
@@ -18,6 +18,7 @@#include <linux/mfd/syscon.h> #include <linux/mfd/syscon/atmel-st.h> #include <linux/miscdevice.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/moduleparam.h> #include <linux/platform_device.h>
@@ -26,8 +27,6 @@#include <linux/types.h> #include <linux/watchdog.h> #include <linux/uaccess.h> -#include <linux/of.h> -#include <linux/of_device.h> #define WDT_DEFAULT_TIME 5/* seconds */ #define WDT_MAX_TIME 256/* seconds */
drivers/watchdog/cpwd.c +1 -1
@@ -31,7 +31,7 @@#include <linux/mutex.h> #include <linux/io.h> #include <linux/of.h> -#include <linux/of_device.h> +#include <linux/platform_device.h> #include <linux/uaccess.h> #include <asm/irq.h>
drivers/watchdog/ftwdt010_wdt.c +2 -4
@@ -14,7 +14,7 @@#include <linux/io.h> #include <linux/kernel.h> #include <linux/module.h> -#include <linux/of_device.h> +#include <linux/mod_devicetable.h> #include <linux/platform_device.h> #include <linux/slab.h> #include <linux/watchdog.h>
@@ -221,20 +221,18 @@ static const struct dev_pm_ops ftwdt010_wdt_dev_pm_ops = { ftwdt010_wdt_resume) }; -#ifdef CONFIG_OF static const struct of_device_id ftwdt010_wdt_match[] = { { .compatible ="faraday,ftwdt010" }, { .compatible ="cortina,gemini-watchdog" }, {}, };MODULE_DEVICE_TABLE (of, ftwdt010_wdt_match); -#endif static struct platform_driver ftwdt010_wdt_driver = { .probe = ftwdt010_wdt_probe, .driver = { .name ="ftwdt010-wdt" , - .of_match_table =of_match_ptr (ftwdt010_wdt_match), + .of_match_table = ftwdt010_wdt_match, .pm = &ftwdt010_wdt_dev_pm_ops, }, };
drivers/watchdog/imx2_wdt.c +1 -2
@@ -26,8 +26,7 @@#include <linux/kernel.h> #include <linux/module.h> #include <linux/moduleparam.h> -#include <linux/of_address.h> -#include <linux/of_device.h> +#include <linux/of.h> #include <linux/platform_device.h> #include <linux/regmap.h> #include <linux/watchdog.h>
drivers/watchdog/imx7ulp_wdt.c +0 -1
@@ -9,7 +9,6 @@#include <linux/kernel.h> #include <linux/module.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/reboot.h> #include <linux/watchdog.h>
drivers/watchdog/meson_wdt.c +2 -2
@@ -11,11 +11,11 @@#include <linux/init.h> #include <linux/io.h> #include <linux/kernel.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/moduleparam.h> -#include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> +#include <linux/property.h> #include <linux/types.h> #include <linux/watchdog.h>
drivers/watchdog/mtk_wdt.c +0 -1
@@ -25,7 +25,6 @@#include <linux/module.h> #include <linux/moduleparam.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/reset-controller.h> #include <linux/types.h>
drivers/watchdog/of_xilinx_wdt.c +1 -2
@@ -10,14 +10,13 @@#include <linux/clk.h> #include <linux/err.h> #include <linux/module.h> +#include <linux/platform_device.h> #include <linux/types.h> #include <linux/kernel.h> #include <linux/ioport.h> #include <linux/watchdog.h> #include <linux/io.h> #include <linux/of.h> -#include <linux/of_device.h> -#include <linux/of_address.h> /* Register offsets for the Wdt device */ #define XWT_TWCSR0_OFFSET 0x0/* Control/Status Register0 */
drivers/watchdog/pic32-dmt.c +1 -2
@@ -10,9 +10,8 @@#include <linux/err.h> #include <linux/io.h> #include <linux/kernel.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> -#include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/pm.h> #include <linux/watchdog.h>
drivers/watchdog/pic32-wdt.c +1 -2
@@ -10,9 +10,8 @@#include <linux/err.h> #include <linux/io.h> #include <linux/kernel.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> -#include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/pm.h> #include <linux/watchdog.h>
drivers/watchdog/pika_wdt.c +1 -1
@@ -23,8 +23,8 @@#include <linux/bitops.h> #include <linux/uaccess.h> #include <linux/io.h> +#include <linux/of.h> #include <linux/of_address.h> -#include <linux/of_platform.h> #define DRV_NAME "PIKA-WDT"
drivers/watchdog/qcom-wdt.c +0 -1
@@ -11,7 +11,6 @@#include <linux/of.h> #include <linux/platform_device.h> #include <linux/watchdog.h> -#include <linux/of_device.h> enum wdt_reg {WDT_RST ,
drivers/watchdog/rave-sp-wdt.c +1 -1
@@ -13,7 +13,7 @@#include <linux/mfd/rave-sp.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/reboot.h> #include <linux/slab.h>
drivers/watchdog/riowd.c +1 -1
@@ -14,7 +14,7 @@#include <linux/miscdevice.h> #include <linux/watchdog.h> #include <linux/of.h> -#include <linux/of_device.h> +#include <linux/platform_device.h> #include <linux/io.h> #include <linux/uaccess.h> #include <linux/slab.h>
drivers/watchdog/rza_wdt.c +2 -2
@@ -9,9 +9,9 @@#include <linux/bitops.h> #include <linux/clk.h> #include <linux/delay.h> +#include <linux/io.h> #include <linux/module.h> -#include <linux/of_address.h> -#include <linux/of_device.h> +#include <linux/of.h> #include <linux/platform_device.h> #include <linux/watchdog.h>
drivers/watchdog/rzg2l_wdt.c +1 -1
@@ -11,7 +11,7 @@#include <linux/iopoll.h> #include <linux/kernel.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/reset.h>
drivers/watchdog/s3c2410_wdt.c +0 -1
@@ -23,7 +23,6 @@#include <linux/slab.h> #include <linux/err.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/mfd/syscon.h> #include <linux/regmap.h> #include <linux/delay.h>
drivers/watchdog/sama5d4_wdt.c +0 -1
@@ -11,7 +11,6 @@#include <linux/kernel.h> #include <linux/module.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/of_irq.h> #include <linux/platform_device.h> #include <linux/reboot.h>
drivers/watchdog/sbsa_gwdt.c +1 -2
@@ -43,10 +43,9 @@#include <linux/io.h> #include <linux/io-64-nonatomic-lo-hi.h> #include <linux/interrupt.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/moduleparam.h> -#include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/uaccess.h> #include <linux/watchdog.h>
drivers/watchdog/starfive-wdt.c +2 -1
@@ -8,7 +8,8 @@#include <linux/clk.h> #include <linux/iopoll.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/reset.h> #include <linux/watchdog.h>
drivers/watchdog/stm32_iwdg.c +0 -1
@@ -17,7 +17,6 @@#include <linux/kernel.h> #include <linux/module.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/watchdog.h>
drivers/watchdog/sunxi_wdt.c +0 -1
@@ -18,7 +18,6 @@#include <linux/module.h> #include <linux/moduleparam.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/types.h> #include <linux/watchdog.h>
drivers/watchdog/xilinx_wwdt.c +2 -2
@@ -9,9 +9,9 @@#include <linux/interrupt.h> #include <linux/io.h> #include <linux/ioport.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> -#include <linux/of_device.h> -#include <linux/of_address.h> +#include <linux/platform_device.h> #include <linux/watchdog.h> /* Max timeout is calculated at 100MHz source clock */
Signature · 1 line
2.40.1
Quoted 10 lines · Rob Herring
The DT
of_device.handof_platform.hdate back to the separateof_platform_bus_typebefore 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 includeplatform_device.handof.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]>
Quoted 389 lines
--- drivers/watchdog/armada_37xx_wdt.c | 1 - drivers/watchdog/at91rm9200_wdt.c | 3 +-- drivers/watchdog/cpwd.c | 2 +- drivers/watchdog/ftwdt010_wdt.c | 6 ++---- drivers/watchdog/imx2_wdt.c | 3 +-- drivers/watchdog/imx7ulp_wdt.c | 1 - drivers/watchdog/meson_wdt.c | 4 ++-- drivers/watchdog/mtk_wdt.c | 1 - drivers/watchdog/of_xilinx_wdt.c | 3 +-- drivers/watchdog/pic32-dmt.c | 3 +-- drivers/watchdog/pic32-wdt.c | 3 +-- drivers/watchdog/pika_wdt.c | 2 +- drivers/watchdog/qcom-wdt.c | 1 - drivers/watchdog/rave-sp-wdt.c | 2 +- drivers/watchdog/riowd.c | 2 +- drivers/watchdog/rza_wdt.c | 4 ++-- drivers/watchdog/rzg2l_wdt.c | 2 +- drivers/watchdog/s3c2410_wdt.c | 1 - drivers/watchdog/sama5d4_wdt.c | 1 - drivers/watchdog/sbsa_gwdt.c | 3 +-- drivers/watchdog/starfive-wdt.c | 3 ++- drivers/watchdog/stm32_iwdg.c | 1 - drivers/watchdog/sunxi_wdt.c | 1 - drivers/watchdog/xilinx_wwdt.c | 4 ++-- 24 files changed, 21 insertions(+), 36 deletions(-)drivers/watchdog/armada_37xx_wdt.c +0
-1@@ -14,7 +14,6 @@#include <linux/module.h> #include <linux/moduleparam.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/regmap.h> #include <linux/types.h> drivers/watchdog/at91rm9200_wdt.c +1
-2@@ -18,6 +18,7 @@#include <linux/mfd/syscon.h> #include <linux/mfd/syscon/atmel-st.h> #include <linux/miscdevice.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/moduleparam.h> #include <linux/platform_device.h> @@ -26,8 +27,6 @@#include <linux/types.h> #include <linux/watchdog.h> #include <linux/uaccess.h> -#include <linux/of.h> -#include <linux/of_device.h> #define WDT_DEFAULT_TIME 5/* seconds */ #define WDT_MAX_TIME 256/* seconds */ drivers/watchdog/cpwd.c +1
-1@@ -31,7 +31,7 @@#include <linux/mutex.h> #include <linux/io.h> #include <linux/of.h> -#include <linux/of_device.h> +#include <linux/platform_device.h> #include <linux/uaccess.h> #include <asm/irq.h> drivers/watchdog/ftwdt010_wdt.c +2
-4@@ -14,7 +14,7 @@#include <linux/io.h> #include <linux/kernel.h> #include <linux/module.h> -#include <linux/of_device.h> +#include <linux/mod_devicetable.h> #include <linux/platform_device.h> #include <linux/slab.h> #include <linux/watchdog.h> @@ -221,20 +221,18 @@ static const struct dev_pm_ops ftwdt010_wdt_dev_pm_ops = { ftwdt010_wdt_resume) }; -#ifdef CONFIG_OF static const struct of_device_id ftwdt010_wdt_match[] = { { .compatible ="faraday,ftwdt010" }, { .compatible ="cortina,gemini-watchdog" }, {}, };MODULE_DEVICE_TABLE (of, ftwdt010_wdt_match); -#endif static struct platform_driver ftwdt010_wdt_driver = { .probe = ftwdt010_wdt_probe, .driver = { .name ="ftwdt010-wdt" , - .of_match_table =of_match_ptr (ftwdt010_wdt_match), + .of_match_table = ftwdt010_wdt_match, .pm = &ftwdt010_wdt_dev_pm_ops, }, };drivers/watchdog/imx2_wdt.c +1
-2@@ -26,8 +26,7 @@#include <linux/kernel.h> #include <linux/module.h> #include <linux/moduleparam.h> -#include <linux/of_address.h> -#include <linux/of_device.h> +#include <linux/of.h> #include <linux/platform_device.h> #include <linux/regmap.h> #include <linux/watchdog.h> drivers/watchdog/imx7ulp_wdt.c +0
-1@@ -9,7 +9,6 @@#include <linux/kernel.h> #include <linux/module.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/reboot.h> #include <linux/watchdog.h> drivers/watchdog/meson_wdt.c +2
-2@@ -11,11 +11,11 @@#include <linux/init.h> #include <linux/io.h> #include <linux/kernel.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/moduleparam.h> -#include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> +#include <linux/property.h> #include <linux/types.h> #include <linux/watchdog.h> drivers/watchdog/mtk_wdt.c +0
-1@@ -25,7 +25,6 @@#include <linux/module.h> #include <linux/moduleparam.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/reset-controller.h> #include <linux/types.h> drivers/watchdog/of_xilinx_wdt.c +1
-2@@ -10,14 +10,13 @@#include <linux/clk.h> #include <linux/err.h> #include <linux/module.h> +#include <linux/platform_device.h> #include <linux/types.h> #include <linux/kernel.h> #include <linux/ioport.h> #include <linux/watchdog.h> #include <linux/io.h> #include <linux/of.h> -#include <linux/of_device.h> -#include <linux/of_address.h> /* Register offsets for the Wdt device */ #define XWT_TWCSR0_OFFSET 0x0/* Control/Status Register0 */ drivers/watchdog/pic32-dmt.c +1
-2@@ -10,9 +10,8 @@#include <linux/err.h> #include <linux/io.h> #include <linux/kernel.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> -#include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/pm.h> #include <linux/watchdog.h> drivers/watchdog/pic32-wdt.c +1
-2@@ -10,9 +10,8 @@#include <linux/err.h> #include <linux/io.h> #include <linux/kernel.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> -#include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/pm.h> #include <linux/watchdog.h> drivers/watchdog/pika_wdt.c +1
-1@@ -23,8 +23,8 @@#include <linux/bitops.h> #include <linux/uaccess.h> #include <linux/io.h> +#include <linux/of.h> #include <linux/of_address.h> -#include <linux/of_platform.h> #define DRV_NAME "PIKA-WDT"drivers/watchdog/qcom-wdt.c +0
-1@@ -11,7 +11,6 @@#include <linux/of.h> #include <linux/platform_device.h> #include <linux/watchdog.h> -#include <linux/of_device.h> enum wdt_reg {WDT_RST ,drivers/watchdog/rave-sp-wdt.c +1
-1@@ -13,7 +13,7 @@#include <linux/mfd/rave-sp.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/reboot.h> #include <linux/slab.h> drivers/watchdog/riowd.c +1
-1@@ -14,7 +14,7 @@#include <linux/miscdevice.h> #include <linux/watchdog.h> #include <linux/of.h> -#include <linux/of_device.h> +#include <linux/platform_device.h> #include <linux/io.h> #include <linux/uaccess.h> #include <linux/slab.h> drivers/watchdog/rza_wdt.c +2
-2@@ -9,9 +9,9 @@#include <linux/bitops.h> #include <linux/clk.h> #include <linux/delay.h> +#include <linux/io.h> #include <linux/module.h> -#include <linux/of_address.h> -#include <linux/of_device.h> +#include <linux/of.h> #include <linux/platform_device.h> #include <linux/watchdog.h> drivers/watchdog/rzg2l_wdt.c +1
-1@@ -11,7 +11,7 @@#include <linux/iopoll.h> #include <linux/kernel.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/reset.h> drivers/watchdog/s3c2410_wdt.c +0
-1@@ -23,7 +23,6 @@#include <linux/slab.h> #include <linux/err.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/mfd/syscon.h> #include <linux/regmap.h> #include <linux/delay.h> drivers/watchdog/sama5d4_wdt.c +0
-1@@ -11,7 +11,6 @@#include <linux/kernel.h> #include <linux/module.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/of_irq.h> #include <linux/platform_device.h> #include <linux/reboot.h> drivers/watchdog/sbsa_gwdt.c +1
-2@@ -43,10 +43,9 @@#include <linux/io.h> #include <linux/io-64-nonatomic-lo-hi.h> #include <linux/interrupt.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/moduleparam.h> -#include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/uaccess.h> #include <linux/watchdog.h> drivers/watchdog/starfive-wdt.c +2
-1@@ -8,7 +8,8 @@#include <linux/clk.h> #include <linux/iopoll.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/reset.h> #include <linux/watchdog.h> drivers/watchdog/stm32_iwdg.c +0
-1@@ -17,7 +17,6 @@#include <linux/kernel.h> #include <linux/module.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/watchdog.h> drivers/watchdog/sunxi_wdt.c +0
-1@@ -18,7 +18,6 @@#include <linux/module.h> #include <linux/moduleparam.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/types.h> #include <linux/watchdog.h> drivers/watchdog/xilinx_wwdt.c +2
-2@@ -9,9 +9,9 @@#include <linux/interrupt.h> #include <linux/io.h> #include <linux/ioport.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> -#include <linux/of_device.h> -#include <linux/of_address.h> +#include <linux/platform_device.h> #include <linux/watchdog.h> /* Max timeout is calculated at 100MHz source clock */
Quoted 55 lines
-----Original Message-----
From: Rob Herring <[email protected]>
Sent: Friday, July 14, 2023 11:21 PM
To: Marek Behún <[email protected]>; Wim Van Sebroeck <wim@linux- watchdog.org>; Guenter Roeck <[email protected]>; Nicolas Ferre <[email protected]>; Alexandre Belloni <[email protected]>; Claudiu Beznea <[email protected]>; Shawn Guo <[email protected]>; Sascha Hauer <[email protected]>; Pengutronix Kernel Team <[email protected]>; Fabio Estevam <[email protected]>; NXP Linux Team <[email protected]>; Neil Armstrong <[email protected]>; Kevin Hilman <[email protected]>; Jerome Brunet <[email protected]>; Martin Blumenstingl <[email protected]>; Matthias Brugger <[email protected]>; AngeloGioacchino Del Regno <[email protected]>; Srinivas Neeli <[email protected]>; Shubhrajyoti Datta <[email protected]>; Michal Simek <[email protected]>; Andy Gross <[email protected]>; Bjorn Andersson <[email protected]>; Konrad Dybcio <[email protected]>; Krzysztof Kozlowski <[email protected]>; Alim Akhtar <[email protected]>; Xingyu Wu <[email protected]>; Samin Guo <[email protected]>; Maxime Coquelin <[email protected]>; Alexandre Torgue <[email protected]>; Chen-Yu Tsai <[email protected]>; Jernej Skrabec <[email protected]>; Samuel Holland <[email protected]>
Cc: [email protected]; [email protected]; linux- [email protected]; [email protected]; linux- [email protected]; [email protected]; linux-arm- [email protected]; [email protected]; linux-stm32@st- md-mailman.stormreply.com; [email protected]
Subject: [PATCH] watchdog: Explicitly include correct DT includesThe DT
of_device.handof_platform.hdate back to the separateof_platform_bus_typebefore 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 includeplatform_device.handof.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/watchdog/armada_37xx_wdt.c | 1 - drivers/watchdog/at91rm9200_wdt.c | 3 +-- drivers/watchdog/cpwd.c | 2 +- drivers/watchdog/ftwdt010_wdt.c | 6 ++---- drivers/watchdog/imx2_wdt.c | 3 +-- drivers/watchdog/imx7ulp_wdt.c | 1 - drivers/watchdog/meson_wdt.c | 4 ++-- drivers/watchdog/mtk_wdt.c | 1 - drivers/watchdog/of_xilinx_wdt.c | 3 +-- drivers/watchdog/pic32-dmt.c | 3 +--
Quoted 8 lines
drivers/watchdog/pic32-wdt.c | 3 +-- drivers/watchdog/pika_wdt.c | 2 +- drivers/watchdog/qcom-wdt.c | 1 - drivers/watchdog/rave-sp-wdt.c | 2 +- drivers/watchdog/riowd.c | 2 +- drivers/watchdog/rza_wdt.c | 4 ++-- drivers/watchdog/rzg2l_wdt.c | 2 +- drivers/watchdog/s3c2410_wdt.c | 1 -
For Samsung WDT
Quoted 374 lines
drivers/watchdog/sama5d4_wdt.c | 1 - drivers/watchdog/sbsa_gwdt.c | 3 +-- drivers/watchdog/starfive-wdt.c | 3 ++- drivers/watchdog/stm32_iwdg.c | 1 - drivers/watchdog/sunxi_wdt.c | 1 - drivers/watchdog/xilinx_wwdt.c | 4 ++-- 24 files changed, 21 insertions(+), 36 deletions(-)drivers/watchdog/armada_37xx_wdt.c +0
-1@@ -14,7 +14,6 @@#include <linux/module.h> #include <linux/moduleparam.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/regmap.h> #include <linux/types.h> drivers/watchdog/at91rm9200_wdt.c +1
-2@@ -18,6 +18,7 @@#include <linux/mfd/syscon.h> #include <linux/mfd/syscon/atmel-st.h> #include <linux/miscdevice.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/moduleparam.h> #include <linux/platform_device.h> @@ -26,8 +27,6 @@#include <linux/types.h> #include <linux/watchdog.h> #include <linux/uaccess.h> -#include <linux/of.h> -#include <linux/of_device.h> #define WDT_DEFAULT_TIME 5/* seconds */ #define WDT_MAX_TIME 256/* seconds */ drivers/watchdog/cpwd.c index renamed from drivers/watchdog/cpwd.c +0
-0
47250f9b68c7..901b94d456db100644drivers/watchdog/cpwd.c +1
-1@@ -31,7 +31,7 @@#include <linux/mutex.h> #include <linux/io.h> #include <linux/of.h> -#include <linux/of_device.h> +#include <linux/platform_device.h> #include <linux/uaccess.h> #include <asm/irq.h> (quoted diff) +0
-0
b/drivers/watchdog/ftwdt010_wdt.cindex442c5bf63ff4..28f5af752c10100644drivers/watchdog/ftwdt010_wdt.c +2
-3@@ -14,7 +14,7 @@#include <linux/io.h> #include <linux/kernel.h> #include <linux/module.h> -#include <linux/of_device.h> +#include <linux/mod_devicetable.h> #include <linux/platform_device.h> #include <linux/slab.h> #include <linux/watchdog.h> @@ -221,20 +221,18 @@ static const struct dev_pm_ops ftwdt010_wdt_dev_pm_ops = { ftwdt010_wdt_resume) }; -#ifdef CONFIG_OF static const struct of_device_id ftwdt010_wdt_match[] = { { .compatible ="faraday,ftwdt010" }, { .compatible ="cortina,gemini-watchdog" }, {}, }; MODULE_DEVICE_TABLE(of, ftwdt010_wdt_match); -#endifstatic struct platform_driver ftwdt010_wdt_driver = { .probe = ftwdt010_wdt_probe, .driver = { .name ="ftwdt010-wdt" , - .of_match_table =of_match_ptr (ftwdt010_wdt_match), + .of_match_table = ftwdt010_wdt_match, .pm = &ftwdt010_wdt_dev_pm_ops, }, };drivers/watchdog/imx2_wdt.c index renamed from drivers/watchdog/imx2_wdt.c +0
-0
6fcc3596103c..1a27665a2f53100644drivers/watchdog/imx2_wdt.c +1
-2@@ -26,8 +26,7 @@#include <linux/kernel.h> #include <linux/module.h> #include <linux/moduleparam.h> -#include <linux/of_address.h> -#include <linux/of_device.h> +#include <linux/of.h> #include <linux/platform_device.h> #include <linux/regmap.h> #include <linux/watchdog.h> drivers/watchdog/imx7ulp_wdt.c +0
-1@@ -9,7 +9,6 @@#include <linux/kernel.h> #include <linux/module.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/reboot.h> #include <linux/watchdog.h> drivers/watchdog/meson_wdt.c +2
-2@@ -11,11 +11,11 @@#include <linux/init.h> #include <linux/io.h> #include <linux/kernel.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/moduleparam.h> -#include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> +#include <linux/property.h> #include <linux/types.h> #include <linux/watchdog.h> drivers/watchdog/mtk_wdt.c index renamed from drivers/watchdog/mtk_wdt.c +0
-0
a9c437598e7e..b2330b16b497100644drivers/watchdog/mtk_wdt.c +0
-1@@ -25,7 +25,6 @@#include <linux/module.h> #include <linux/moduleparam.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/reset-controller.h> #include <linux/types.h> drivers/watchdog/of_xilinx_wdt.c +1
-2@@ -10,14 +10,13 @@#include <linux/clk.h> #include <linux/err.h> #include <linux/module.h> +#include <linux/platform_device.h> #include <linux/types.h> #include <linux/kernel.h> #include <linux/ioport.h> #include <linux/watchdog.h> #include <linux/io.h> #include <linux/of.h> -#include <linux/of_device.h> -#include <linux/of_address.h> /* Register offsets for the Wdt device */ #define XWT_TWCSR0_OFFSET 0x0/* Control/Status Register0 */ drivers/watchdog/pic32-dmt.c +1
-2@@ -10,9 +10,8 @@#include <linux/err.h> #include <linux/io.h> #include <linux/kernel.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> -#include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/pm.h> #include <linux/watchdog.h> drivers/watchdog/pic32-wdt.c index renamed from drivers/watchdog/pic32-wdt.c +0
-0
6d1a00222991..4d7eaf290e1c100644drivers/watchdog/pic32-wdt.c +1
-2@@ -10,9 +10,8 @@#include <linux/err.h> #include <linux/io.h> #include <linux/kernel.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> -#include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/pm.h> #include <linux/watchdog.h> drivers/watchdog/pika_wdt.c index renamed from drivers/watchdog/pika_wdt.c +0
-0
a98abd0d3146..782b8c23d99c100644drivers/watchdog/pika_wdt.c +1
-1@@ -23,8 +23,8 @@#include <linux/bitops.h> #include <linux/uaccess.h> #include <linux/io.h> +#include <linux/of.h> #include <linux/of_address.h> -#include <linux/of_platform.h> #define DRV_NAME "PIKA-WDT"drivers/watchdog/qcom-wdt.c +0
-1@@ -11,7 +11,6 @@#include <linux/of.h> #include <linux/platform_device.h> #include <linux/watchdog.h> -#include <linux/of_device.h> enum wdt_reg {WDT_RST ,drivers/watchdog/rave-sp-wdt.c +1
-1@@ -13,7 +13,7 @@#include <linux/mfd/rave-sp.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/reboot.h> #include <linux/slab.h> drivers/watchdog/riowd.c index renamed from drivers/watchdog/riowd.c +0
-0
c04b383e1712..b293792a292a100644drivers/watchdog/riowd.c +1
-1@@ -14,7 +14,7 @@#include <linux/miscdevice.h> #include <linux/watchdog.h> #include <linux/of.h> -#include <linux/of_device.h> +#include <linux/platform_device.h> #include <linux/io.h> #include <linux/uaccess.h> #include <linux/slab.h> drivers/watchdog/rza_wdt.c index renamed from drivers/watchdog/rza_wdt.c +0
-0
fe6c2ed35e04..cb4901b3f777100644drivers/watchdog/rza_wdt.c +2
-2@@ -9,9 +9,9 @@#include <linux/bitops.h> #include <linux/clk.h> #include <linux/delay.h> +#include <linux/io.h> #include <linux/module.h> -#include <linux/of_address.h> -#include <linux/of_device.h> +#include <linux/of.h> #include <linux/platform_device.h> #include <linux/watchdog.h> drivers/watchdog/rzg2l_wdt.c index renamed from drivers/watchdog/rzg2l_wdt.c +0
-0
d404953d0e0f..1741f98ca67c100644drivers/watchdog/rzg2l_wdt.c +1
-1@@ -11,7 +11,7 @@#include <linux/iopoll.h> #include <linux/kernel.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/reset.h> (quoted diff) +0
-0
b/drivers/watchdog/s3c2410_wdt.cindex95416a9bdd4b..2bcc8faa7fa5100644drivers/watchdog/s3c2410_wdt.c +0
-1@@ -23,7 +23,6 @@#include <linux/slab.h> #include <linux/err.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/mfd/syscon.h> #include <linux/regmap.h> #include <linux/delay.h> (quoted diff) +0
-0
b/drivers/watchdog/sama5d4_wdt.cindexaeee934ca51b..71e8b5fbf51f100644drivers/watchdog/sama5d4_wdt.c +0
-1@@ -11,7 +11,6 @@#include <linux/kernel.h> #include <linux/module.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/of_irq.h> #include <linux/platform_device.h> #include <linux/reboot.h> drivers/watchdog/sbsa_gwdt.c +1
-2@@ -43,10 +43,9 @@#include <linux/io.h> #include <linux/io-64-nonatomic-lo-hi.h> #include <linux/interrupt.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/moduleparam.h> -#include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/uaccess.h> #include <linux/watchdog.h> drivers/watchdog/starfive-wdt.c +2
-1@@ -8,7 +8,8 @@#include <linux/clk.h> #include <linux/iopoll.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/reset.h> #include <linux/watchdog.h> drivers/watchdog/stm32_iwdg.c +0
-1@@ -17,7 +17,6 @@#include <linux/kernel.h> #include <linux/module.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/watchdog.h> drivers/watchdog/sunxi_wdt.c +0
-1@@ -18,7 +18,6 @@#include <linux/module.h> #include <linux/moduleparam.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/types.h> #include <linux/watchdog.h> drivers/watchdog/xilinx_wwdt.c +2
-3@@ -9,9 +9,9 @@#include <linux/interrupt.h> #include <linux/io.h> #include <linux/ioport.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> -#include <linux/of_device.h> -#include <linux/of_address.h> +#include <linux/platform_device.h> #include <linux/watchdog.h> /* Max timeout is calculated at 100MHz source clock */ --
Quoted 1 line
2.40.1
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel