summaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/s3c2410_wdt.c
diff options
context:
space:
mode:
authorThomas Abraham <thomas.abraham@linaro.org>2011-06-22 11:54:32 +0200
committerWim Van Sebroeck <wim@iguana.be>2011-07-22 11:00:43 +0200
commit9487a9cc7140ef88d532c989570ee77436ede1e0 (patch)
treed0a99b859b89c461ed2cc3c45037ebb76d9b0b5e /drivers/watchdog/s3c2410_wdt.c
parentwatchdog: mpcore_wdt: Add suspend/resume support. (diff)
downloadlinux-9487a9cc7140ef88d532c989570ee77436ede1e0.tar.xz
linux-9487a9cc7140ef88d532c989570ee77436ede1e0.zip
watchdog: s3c2410: Add support for device tree based probe
This patch adds the of_match_table to enable s3c2410-wdt driver to be probed when watchdog device node is found in the device tree. Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog/s3c2410_wdt.c')
-rw-r--r--drivers/watchdog/s3c2410_wdt.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c
index f7f5aa00df60..30da88f47cd3 100644
--- a/drivers/watchdog/s3c2410_wdt.c
+++ b/drivers/watchdog/s3c2410_wdt.c
@@ -589,6 +589,15 @@ static int s3c2410wdt_resume(struct platform_device *dev)
#define s3c2410wdt_resume NULL
#endif /* CONFIG_PM */
+#ifdef CONFIG_OF
+static const struct of_device_id s3c2410_wdt_match[] = {
+ { .compatible = "samsung,s3c2410-wdt" },
+ {},
+};
+MODULE_DEVICE_TABLE(of, s3c2410_wdt_match);
+#else
+#define s3c2410_wdt_match NULL
+#endif
static struct platform_driver s3c2410wdt_driver = {
.probe = s3c2410wdt_probe,
@@ -599,6 +608,7 @@ static struct platform_driver s3c2410wdt_driver = {
.driver = {
.owner = THIS_MODULE,
.name = "s3c2410-wdt",
+ .of_match_table = s3c2410_wdt_match,
},
};