aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-07-17 16:35:59 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-07-17 16:35:59 +0000
commitc02c7b6d67cd3daa4b7c8f3ce30a8c56aba91d1f (patch)
tree079b23f5f524715e4dec3fd9e3f9179d2c2bbe40 /target/linux
parent49f26fc73eefcf8bb196dd7479fc9f3bd2a6c453 (diff)
downloadupstream-c02c7b6d67cd3daa4b7c8f3ce30a8c56aba91d1f.tar.gz
upstream-c02c7b6d67cd3daa4b7c8f3ce30a8c56aba91d1f.tar.bz2
upstream-c02c7b6d67cd3daa4b7c8f3ce30a8c56aba91d1f.zip
atheros[ar2315-wdt]: update initialization
* update driver id to be consistent with other ar231x drivers * remove odd module_{init,exit} * add module metadata (description, name, etc.) Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41684 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/atheros/patches-3.10/100-board.patch2
-rw-r--r--target/linux/atheros/patches-3.10/130-watchdog.patch29
2 files changed, 11 insertions, 20 deletions
diff --git a/target/linux/atheros/patches-3.10/100-board.patch b/target/linux/atheros/patches-3.10/100-board.patch
index f46dc0be9b..36ad7c8925 100644
--- a/target/linux/atheros/patches-3.10/100-board.patch
+++ b/target/linux/atheros/patches-3.10/100-board.patch
@@ -2525,7 +2525,7 @@
+
+static struct platform_device ar2315_wdt = {
+ .id = 0,
-+ .name = "ar2315_wdt",
++ .name = "ar2315-wdt",
+};
+
+/*
diff --git a/target/linux/atheros/patches-3.10/130-watchdog.patch b/target/linux/atheros/patches-3.10/130-watchdog.patch
index 100dfa6580..5dd0e75842 100644
--- a/target/linux/atheros/patches-3.10/130-watchdog.patch
+++ b/target/linux/atheros/patches-3.10/130-watchdog.patch
@@ -1,6 +1,6 @@
--- /dev/null
+++ b/drivers/watchdog/ar2315-wtd.c
-@@ -0,0 +1,198 @@
+@@ -0,0 +1,189 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
@@ -39,6 +39,8 @@
+#include <ar2315_regs.h>
+#include <ar231x.h>
+
++#define DRIVER_NAME "ar2315-wdt"
++
+#define CLOCK_RATE 40000000
+#define HEARTBEAT(x) (x < 1 || x > 90 ? 20 : x)
+
@@ -151,7 +153,7 @@
+
+ ar2315_wdt_enable();
+ ret = request_irq(AR531X_MISC_IRQ_WATCHDOG, ar2315_wdt_interrupt,
-+ IRQF_DISABLED, "ar2315_wdt", dev);
++ IRQF_DISABLED, DRIVER_NAME, dev);
+ if (ret) {
+ dev_err(&dev->dev, "failed to register inetrrupt\n");
+ goto out;
@@ -177,28 +179,17 @@
+ .probe = ar2315_wdt_probe,
+ .remove = ar2315_wdt_remove,
+ .driver = {
-+ .name = "ar2315_wdt",
++ .name = DRIVER_NAME,
+ .owner = THIS_MODULE,
+ },
+};
+
-+static int __init
-+init_ar2315_wdt(void)
-+{
-+ int ret = platform_driver_register(&ar2315_wdt_driver);
-+ if (ret)
-+ pr_err("ar2315_wdt: error registering platfom driver!\n");
-+ return ret;
-+}
-+
-+static void __exit
-+exit_ar2315_wdt(void)
-+{
-+ platform_driver_unregister(&ar2315_wdt_driver);
-+}
++module_platform_driver(ar2315_wdt_driver);
+
-+module_init(init_ar2315_wdt);
-+module_exit(exit_ar2315_wdt);
++MODULE_DESCRIPTION("Atheros AR2315 hardware watchdog driver");
++MODULE_AUTHOR("John Crispin <blogic@openwrt.org>");
++MODULE_LICENSE("GPL");
++MODULE_ALIAS("platform:" DRIVER_NAME);
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -1113,6 +1113,12 @@ config LANTIQ_WDT