Commit cc85f87a authored by Rob Herring's avatar Rob Herring Committed by Wim Van Sebroeck
Browse files

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: default avatarGuenter Roeck <linux@roeck-us.net>
Acked-by: default avatarAlim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230726233302.3812749-1-robh@kernel.org


Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarWim Van Sebroeck <wim@linux-watchdog.org>
parent ef9e7fe2
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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>
+1 −2
Original line number Diff line number Diff line
@@ -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 */
+1 −1
Original line number Diff line number Diff line
@@ -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>
+2 −4
Original line number Diff line number Diff line
@@ -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,
	},
};
+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@
#include <linux/fs.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
#include <linux/io.h>
#include <linux/uaccess.h>

Loading