aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ipq806x/patches-4.4/010-3-watchdog-Add-action-and-data-parameters-to-restart-handler-callback.patch
diff options
context:
space:
mode:
authorPavel Kubelun <be.dissent@gmail.com>2016-11-04 02:12:32 +0300
committerJohn Crispin <john@phrozen.org>2016-11-16 10:59:30 +0100
commit793d448a51b53d81e2dbd58a5865a204de92ad34 (patch)
treec0bc1ee32bdff6336dfa73288b5d7f2ac8564a7b /target/linux/ipq806x/patches-4.4/010-3-watchdog-Add-action-and-data-parameters-to-restart-handler-callback.patch
parent4a6f9fc6333d5043d4ddfd25d87be3ae17f9e794 (diff)
downloadupstream-793d448a51b53d81e2dbd58a5865a204de92ad34.tar.gz
upstream-793d448a51b53d81e2dbd58a5865a204de92ad34.tar.bz2
upstream-793d448a51b53d81e2dbd58a5865a204de92ad34.zip
ipq806x: backport upstream wdt driver
Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
Diffstat (limited to 'target/linux/ipq806x/patches-4.4/010-3-watchdog-Add-action-and-data-parameters-to-restart-handler-callback.patch')
-rw-r--r--target/linux/ipq806x/patches-4.4/010-3-watchdog-Add-action-and-data-parameters-to-restart-handler-callback.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/target/linux/ipq806x/patches-4.4/010-3-watchdog-Add-action-and-data-parameters-to-restart-handler-callback.patch b/target/linux/ipq806x/patches-4.4/010-3-watchdog-Add-action-and-data-parameters-to-restart-handler-callback.patch
new file mode 100644
index 0000000000..7ceff32caa
--- /dev/null
+++ b/target/linux/ipq806x/patches-4.4/010-3-watchdog-Add-action-and-data-parameters-to-restart-handler-callback.patch
@@ -0,0 +1,51 @@
+rom 4d8b229d5ea610affe672e919021e9d02cd877da Mon Sep 17 00:00:00 2001
+From: Guenter Roeck <linux@roeck-us.net>
+Date: Fri, 26 Feb 2016 17:32:49 -0800
+Subject: watchdog: Add 'action' and 'data' parameters to restart handler
+ callback
+
+The 'action' (or restart mode) and data parameters may be used by restart
+handlers, so they should be passed to the restart callback functions.
+
+Cc: Sylvain Lemieux <slemieux@tycoint.com>
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
+---
+ drivers/watchdog/qcom-wdt.c | 3 ++-
+ drivers/watchdog/watchdog_core.c | 2 +-
+ include/linux/watchdog.h | 2 +-
+
+--- a/drivers/watchdog/qcom-wdt.c
++++ b/drivers/watchdog/qcom-wdt.c
+@@ -70,7 +70,8 @@ static int qcom_wdt_set_timeout(struct w
+ return qcom_wdt_start(wdd);
+ }
+
+-static int qcom_wdt_restart(struct watchdog_device *wdd)
++static int qcom_wdt_restart(struct watchdog_device *wdd, unsigned long action,
++ void *data)
+ {
+ struct qcom_wdt *wdt = to_qcom_wdt(wdd);
+ u32 timeout;
+--- a/drivers/watchdog/watchdog_core.c
++++ b/drivers/watchdog/watchdog_core.c
+@@ -164,7 +164,7 @@ static int watchdog_restart_notifier(str
+
+ int ret;
+
+- ret = wdd->ops->restart(wdd);
++ ret = wdd->ops->restart(wdd, action, data);
+ if (ret)
+ return NOTIFY_BAD;
+
+--- a/include/linux/watchdog.h
++++ b/include/linux/watchdog.h
+@@ -46,7 +46,7 @@ struct watchdog_ops {
+ unsigned int (*status)(struct watchdog_device *);
+ int (*set_timeout)(struct watchdog_device *, unsigned int);
+ unsigned int (*get_timeleft)(struct watchdog_device *);
+- int (*restart)(struct watchdog_device *);
++ int (*restart)(struct watchdog_device *, unsigned long, void *);
+ long (*ioctl)(struct watchdog_device *, unsigned int, unsigned long);
+ };
+