7ceff32caad93ef43f02fd8f31a8a4ac7c2ccbbd
[openwrt/staging/florian.git] /
1 rom 4d8b229d5ea610affe672e919021e9d02cd877da Mon Sep 17 00:00:00 2001
2 From: Guenter Roeck <linux@roeck-us.net>
3 Date: Fri, 26 Feb 2016 17:32:49 -0800
4 Subject: watchdog: Add 'action' and 'data' parameters to restart handler
5 callback
6
7 The 'action' (or restart mode) and data parameters may be used by restart
8 handlers, so they should be passed to the restart callback functions.
9
10 Cc: Sylvain Lemieux <slemieux@tycoint.com>
11 Signed-off-by: Guenter Roeck <linux@roeck-us.net>
12 Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
13 ---
14 drivers/watchdog/qcom-wdt.c | 3 ++-
15 drivers/watchdog/watchdog_core.c | 2 +-
16 include/linux/watchdog.h | 2 +-
17
18 --- a/drivers/watchdog/qcom-wdt.c
19 +++ b/drivers/watchdog/qcom-wdt.c
20 @@ -70,7 +70,8 @@ static int qcom_wdt_set_timeout(struct w
21 return qcom_wdt_start(wdd);
22 }
23
24 -static int qcom_wdt_restart(struct watchdog_device *wdd)
25 +static int qcom_wdt_restart(struct watchdog_device *wdd, unsigned long action,
26 + void *data)
27 {
28 struct qcom_wdt *wdt = to_qcom_wdt(wdd);
29 u32 timeout;
30 --- a/drivers/watchdog/watchdog_core.c
31 +++ b/drivers/watchdog/watchdog_core.c
32 @@ -164,7 +164,7 @@ static int watchdog_restart_notifier(str
33
34 int ret;
35
36 - ret = wdd->ops->restart(wdd);
37 + ret = wdd->ops->restart(wdd, action, data);
38 if (ret)
39 return NOTIFY_BAD;
40
41 --- a/include/linux/watchdog.h
42 +++ b/include/linux/watchdog.h
43 @@ -46,7 +46,7 @@ struct watchdog_ops {
44 unsigned int (*status)(struct watchdog_device *);
45 int (*set_timeout)(struct watchdog_device *, unsigned int);
46 unsigned int (*get_timeleft)(struct watchdog_device *);
47 - int (*restart)(struct watchdog_device *);
48 + int (*restart)(struct watchdog_device *, unsigned long, void *);
49 long (*ioctl)(struct watchdog_device *, unsigned int, unsigned long);
50 };
51