Skip to content

Commit cc85f87

Browse files
robherringWim Van Sebroeck
authored andcommitted
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 was 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. Reviewed-by: Guenter Roeck <[email protected]> Acked-by: Alim Akhtar <[email protected]> Signed-off-by: Rob Herring <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
1 parent ef9e7fe commit cc85f87

27 files changed

+24
-38
lines changed

drivers/watchdog/armada_37xx_wdt.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#include <linux/module.h>
1515
#include <linux/moduleparam.h>
1616
#include <linux/of.h>
17-
#include <linux/of_device.h>
1817
#include <linux/platform_device.h>
1918
#include <linux/regmap.h>
2019
#include <linux/types.h>

drivers/watchdog/at91rm9200_wdt.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <linux/mfd/syscon.h>
1919
#include <linux/mfd/syscon/atmel-st.h>
2020
#include <linux/miscdevice.h>
21+
#include <linux/mod_devicetable.h>
2122
#include <linux/module.h>
2223
#include <linux/moduleparam.h>
2324
#include <linux/platform_device.h>
@@ -26,8 +27,6 @@
2627
#include <linux/types.h>
2728
#include <linux/watchdog.h>
2829
#include <linux/uaccess.h>
29-
#include <linux/of.h>
30-
#include <linux/of_device.h>
3130

3231
#define WDT_DEFAULT_TIME 5 /* seconds */
3332
#define WDT_MAX_TIME 256 /* seconds */

drivers/watchdog/cpwd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#include <linux/mutex.h>
3232
#include <linux/io.h>
3333
#include <linux/of.h>
34-
#include <linux/of_device.h>
34+
#include <linux/platform_device.h>
3535
#include <linux/uaccess.h>
3636

3737
#include <asm/irq.h>

drivers/watchdog/ftwdt010_wdt.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include <linux/io.h>
1515
#include <linux/kernel.h>
1616
#include <linux/module.h>
17-
#include <linux/of_device.h>
17+
#include <linux/mod_devicetable.h>
1818
#include <linux/platform_device.h>
1919
#include <linux/slab.h>
2020
#include <linux/watchdog.h>
@@ -221,20 +221,18 @@ static const struct dev_pm_ops ftwdt010_wdt_dev_pm_ops = {
221221
ftwdt010_wdt_resume)
222222
};
223223

224-
#ifdef CONFIG_OF
225224
static const struct of_device_id ftwdt010_wdt_match[] = {
226225
{ .compatible = "faraday,ftwdt010" },
227226
{ .compatible = "cortina,gemini-watchdog" },
228227
{},
229228
};
230229
MODULE_DEVICE_TABLE(of, ftwdt010_wdt_match);
231-
#endif
232230

233231
static struct platform_driver ftwdt010_wdt_driver = {
234232
.probe = ftwdt010_wdt_probe,
235233
.driver = {
236234
.name = "ftwdt010-wdt",
237-
.of_match_table = of_match_ptr(ftwdt010_wdt_match),
235+
.of_match_table = ftwdt010_wdt_match,
238236
.pm = &ftwdt010_wdt_dev_pm_ops,
239237
},
240238
};

drivers/watchdog/gef_wdt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#include <linux/fs.h>
3232
#include <linux/of.h>
3333
#include <linux/of_address.h>
34-
#include <linux/of_platform.h>
34+
#include <linux/platform_device.h>
3535
#include <linux/io.h>
3636
#include <linux/uaccess.h>
3737

drivers/watchdog/imx2_wdt.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@
2626
#include <linux/kernel.h>
2727
#include <linux/module.h>
2828
#include <linux/moduleparam.h>
29-
#include <linux/of_address.h>
30-
#include <linux/of_device.h>
29+
#include <linux/of.h>
3130
#include <linux/platform_device.h>
3231
#include <linux/regmap.h>
3332
#include <linux/watchdog.h>

drivers/watchdog/imx7ulp_wdt.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#include <linux/kernel.h>
1010
#include <linux/module.h>
1111
#include <linux/of.h>
12-
#include <linux/of_device.h>
1312
#include <linux/platform_device.h>
1413
#include <linux/reboot.h>
1514
#include <linux/watchdog.h>

drivers/watchdog/lantiq_wdt.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
#include <linux/module.h>
1010
#include <linux/bitops.h>
1111
#include <linux/watchdog.h>
12-
#include <linux/of_platform.h>
12+
#include <linux/of.h>
13+
#include <linux/platform_device.h>
1314
#include <linux/uaccess.h>
1415
#include <linux/clk.h>
1516
#include <linux/io.h>

drivers/watchdog/meson_wdt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
#include <linux/init.h>
1212
#include <linux/io.h>
1313
#include <linux/kernel.h>
14+
#include <linux/mod_devicetable.h>
1415
#include <linux/module.h>
1516
#include <linux/moduleparam.h>
16-
#include <linux/of.h>
17-
#include <linux/of_device.h>
1817
#include <linux/platform_device.h>
18+
#include <linux/property.h>
1919
#include <linux/types.h>
2020
#include <linux/watchdog.h>
2121

drivers/watchdog/mpc8xxx_wdt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
#include <linux/fs.h>
1717
#include <linux/init.h>
1818
#include <linux/kernel.h>
19-
#include <linux/of_address.h>
20-
#include <linux/of_platform.h>
19+
#include <linux/of.h>
20+
#include <linux/platform_device.h>
2121
#include <linux/module.h>
2222
#include <linux/watchdog.h>
2323
#include <linux/io.h>

0 commit comments

Comments
 (0)