[mcs814x] nuport-mac: properly protect the phy interrupt handler
[openwrt/svn-archive/archive.git] / target / linux / lantiq / patches-3.3 / 0042-WDT-MIPS-lantiq-use-module_platform_driver-inside-la.patch
1 From 9004f152deddba21ab7b0fa3ba0b243fb5cbd5a1 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 42/70] WDT: MIPS: lantiq: use module_platform_driver inside
5 lantiq watchdog driver
6
7 Reduce boilerplate code by converting driver to module_platform_driver.
8
9 Signed-off-by: John Crispin <blogic@openwrt.org>
10 Cc: linux-watchdog@vger.kernel.org
11 ---
12 drivers/watchdog/lantiq_wdt.c | 19 +++----------------
13 1 files changed, 3 insertions(+), 16 deletions(-)
14
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 = &ltq_wdt_fops,
19 };
20
21 -static int __init
22 +static int __devinit
23 ltq_wdt_probe(struct platform_device *pdev)
24 {
25 struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
26 @@ -227,6 +227,7 @@ ltq_wdt_remove(struct platform_device *p
27
28
29 static struct platform_driver ltq_wdt_driver = {
30 + .probe = ltq_wdt_probe,
31 .remove = __devexit_p(ltq_wdt_remove),
32 .driver = {
33 .name = "ltq_wdt",
34 @@ -234,21 +235,7 @@ static struct platform_driver ltq_wdt_dr
35 },
36 };
37
38 -static int __init
39 -init_ltq_wdt(void)
40 -{
41 - return platform_driver_probe(&ltq_wdt_driver, ltq_wdt_probe);
42 -}
43 -
44 -static void __exit
45 -exit_ltq_wdt(void)
46 -{
47 - return platform_driver_unregister(&ltq_wdt_driver);
48 -}
49 -
50 -module_init(init_ltq_wdt);
51 -module_exit(exit_ltq_wdt);
52 -
53 +module_platform_driver(ltq_wdt_driver);
54 module_param(nowayout, int, 0);
55 MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started");
56