2012-04-12 15:33:56 +03:00
|
|
|
From 3b8b06b76d01136fa4e195a10c5ee12b2352616e Mon Sep 17 00:00:00 2001
|
2012-03-25 11:50:09 +03:00
|
|
|
From: John Crispin <blogic@openwrt.org>
|
|
|
|
Date: Mon, 20 Feb 2012 12:16:31 +0100
|
2012-04-12 15:33:56 +03:00
|
|
|
Subject: [PATCH 45/73] WDT: MIPS: lantiq: use module_platform_driver inside
|
2012-03-25 11:50:09 +03:00
|
|
|
lantiq watchdog driver
|
|
|
|
|
|
|
|
Reduce boilerplate code by converting driver to module_platform_driver.
|
|
|
|
|
|
|
|
Signed-off-by: John Crispin <blogic@openwrt.org>
|
|
|
|
Cc: linux-watchdog@vger.kernel.org
|
|
|
|
---
|
|
|
|
drivers/watchdog/lantiq_wdt.c | 19 +++----------------
|
|
|
|
1 files changed, 3 insertions(+), 16 deletions(-)
|
|
|
|
|
|
|
|
--- a/drivers/watchdog/lantiq_wdt.c
|
|
|
|
+++ b/drivers/watchdog/lantiq_wdt.c
|
2012-04-17 15:50:54 +03:00
|
|
|
@@ -182,7 +182,7 @@ static struct miscdevice ltq_wdt_miscdev
|
2012-03-25 11:50:09 +03:00
|
|
|
.fops = <q_wdt_fops,
|
|
|
|
};
|
|
|
|
|
|
|
|
-static int __init
|
|
|
|
+static int __devinit
|
|
|
|
ltq_wdt_probe(struct platform_device *pdev)
|
|
|
|
{
|
|
|
|
struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
2012-04-17 15:50:54 +03:00
|
|
|
@@ -230,6 +230,7 @@ ltq_wdt_remove(struct platform_device *p
|
2012-03-25 11:50:09 +03:00
|
|
|
|
|
|
|
|
|
|
|
static struct platform_driver ltq_wdt_driver = {
|
|
|
|
+ .probe = ltq_wdt_probe,
|
|
|
|
.remove = __devexit_p(ltq_wdt_remove),
|
|
|
|
.driver = {
|
|
|
|
.name = "ltq_wdt",
|
2012-04-17 15:50:54 +03:00
|
|
|
@@ -237,21 +238,7 @@ static struct platform_driver ltq_wdt_dr
|
2012-03-25 11:50:09 +03:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
-static int __init
|
|
|
|
-init_ltq_wdt(void)
|
|
|
|
-{
|
|
|
|
- return platform_driver_probe(<q_wdt_driver, ltq_wdt_probe);
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-static void __exit
|
|
|
|
-exit_ltq_wdt(void)
|
|
|
|
-{
|
|
|
|
- return platform_driver_unregister(<q_wdt_driver);
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-module_init(init_ltq_wdt);
|
|
|
|
-module_exit(exit_ltq_wdt);
|
|
|
|
-
|
|
|
|
+module_platform_driver(ltq_wdt_driver);
|
|
|
|
module_param(nowayout, int, 0);
|
|
|
|
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started");
|
|
|
|
|