1 From 7d332825d131e70daff66b934797c89f50c11ace Mon Sep 17 00:00:00 2001
2 From: John Crispin <blogic@openwrt.org>
3 Date: Mon, 20 Feb 2012 12:16:31 +0100
4 Subject: [PATCH 46/70] WDT: MIPS: lantiq: use module_platform_driver inside
7 Reduce boilerplate code by converting driver to module_platform_driver.
9 Signed-off-by: John Crispin <blogic@openwrt.org>
10 Cc: linux-watchdog@vger.kernel.org
12 drivers/watchdog/lantiq_wdt.c | 19 +++----------------
13 1 files changed, 3 insertions(+), 16 deletions(-)
15 --- a/drivers/watchdog/lantiq_wdt.c
16 +++ b/drivers/watchdog/lantiq_wdt.c
17 @@ -182,7 +182,7 @@ static struct miscdevice ltq_wdt_miscdev
18 .fops = <q_wdt_fops,
23 ltq_wdt_probe(struct platform_device *pdev)
25 struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
26 @@ -230,6 +230,7 @@ ltq_wdt_remove(struct platform_device *p
29 static struct platform_driver ltq_wdt_driver = {
30 + .probe = ltq_wdt_probe,
31 .remove = __devexit_p(ltq_wdt_remove),
34 @@ -237,21 +238,7 @@ static struct platform_driver ltq_wdt_dr
41 - return platform_driver_probe(<q_wdt_driver, ltq_wdt_probe);
47 - return platform_driver_unregister(<q_wdt_driver);
50 -module_init(init_ltq_wdt);
51 -module_exit(exit_ltq_wdt);
53 +module_platform_driver(ltq_wdt_driver);
54 module_param(nowayout, int, 0);
55 MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started");