793d448a51
Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
51 lines
1.7 KiB
Diff
51 lines
1.7 KiB
Diff
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);
|
|
};
|
|
|