summaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq/patches-3.2/0045-WDT-MIPS-lantiq-use-module_platform_driver-inside-la.patch
diff options
context:
space:
mode:
authorblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-04-12 12:33:56 +0000
committerblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-04-12 12:33:56 +0000
commit9e31085943dfadaa0f5961f5cbc4f7a240a09c53 (patch)
treed933bb536eb34a7b28b804d06d8dac93d585fd62 /target/linux/lantiq/patches-3.2/0045-WDT-MIPS-lantiq-use-module_platform_driver-inside-la.patch
parentd7f2b105adff786e97f5a45373392f1e8eeee8f9 (diff)
[lantiq] update 3.2 patches
sync with lantiq kernel series git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31260 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/lantiq/patches-3.2/0045-WDT-MIPS-lantiq-use-module_platform_driver-inside-la.patch')
-rw-r--r--target/linux/lantiq/patches-3.2/0045-WDT-MIPS-lantiq-use-module_platform_driver-inside-la.patch61
1 files changed, 61 insertions, 0 deletions
diff --git a/target/linux/lantiq/patches-3.2/0045-WDT-MIPS-lantiq-use-module_platform_driver-inside-la.patch b/target/linux/lantiq/patches-3.2/0045-WDT-MIPS-lantiq-use-module_platform_driver-inside-la.patch
new file mode 100644
index 000000000..69894d668
--- /dev/null
+++ b/target/linux/lantiq/patches-3.2/0045-WDT-MIPS-lantiq-use-module_platform_driver-inside-la.patch
@@ -0,0 +1,61 @@
+From 3b8b06b76d01136fa4e195a10c5ee12b2352616e Mon Sep 17 00:00:00 2001
+From: John Crispin <blogic@openwrt.org>
+Date: Mon, 20 Feb 2012 12:16:31 +0100
+Subject: [PATCH 45/73] WDT: MIPS: lantiq: use module_platform_driver inside
+ 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(-)
+
+diff --git a/drivers/watchdog/lantiq_wdt.c b/drivers/watchdog/lantiq_wdt.c
+index da2b09f..40c9eb7 100644
+--- a/drivers/watchdog/lantiq_wdt.c
++++ b/drivers/watchdog/lantiq_wdt.c
+@@ -182,7 +182,7 @@ static struct miscdevice ltq_wdt_miscdev = {
+ .fops = &ltq_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);
+@@ -230,6 +230,7 @@ ltq_wdt_remove(struct platform_device *pdev)
+
+
+ static struct platform_driver ltq_wdt_driver = {
++ .probe = ltq_wdt_probe,
+ .remove = __devexit_p(ltq_wdt_remove),
+ .driver = {
+ .name = "ltq_wdt",
+@@ -237,21 +238,7 @@ static struct platform_driver ltq_wdt_driver = {
+ },
+ };
+
+-static int __init
+-init_ltq_wdt(void)
+-{
+- return platform_driver_probe(&ltq_wdt_driver, ltq_wdt_probe);
+-}
+-
+-static void __exit
+-exit_ltq_wdt(void)
+-{
+- return platform_driver_unregister(&ltq_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");
+
+--
+1.7.9.1
+