From 15920d12998a408efe4b1b25a28c21dfc48f6e69 Mon Sep 17 00:00:00 2001 From: Gabor Juhos Date: Sat, 2 Feb 2013 10:34:54 +0100 Subject: watchdog: ath79_wdt: add device tree matching Cc: Grant Likely Cc: devicetree-discuss@lists.ozlabs.org Signed-off-by: Gabor Juhos Signed-off-by: Wim Van Sebroeck --- drivers/watchdog/ath79_wdt.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'drivers') diff --git a/drivers/watchdog/ath79_wdt.c b/drivers/watchdog/ath79_wdt.c index e786f644e14b..898799074a13 100644 --- a/drivers/watchdog/ath79_wdt.c +++ b/drivers/watchdog/ath79_wdt.c @@ -33,6 +33,8 @@ #include #include #include +#include +#include #define DRIVER_NAME "ath79-wdt" @@ -308,6 +310,14 @@ static void ath97_wdt_shutdown(struct platform_device *pdev) ath79_wdt_disable(); } +#ifdef CONFIG_OF +static const struct of_device_id ath79_wdt_match[] = { + { .compatible = "qca,ar7130-wdt" }, + {}, +}; +MODULE_DEVICE_TABLE(of, ath79_wdt_match); +#endif + static struct platform_driver ath79_wdt_driver = { .probe = ath79_wdt_probe, .remove = ath79_wdt_remove, @@ -315,6 +325,7 @@ static struct platform_driver ath79_wdt_driver = { .driver = { .name = DRIVER_NAME, .owner = THIS_MODULE, + .of_match_table = of_match_ptr(ath79_wdt_match), }, }; -- cgit v1.2.3