diff options
author | Wim Van Sebroeck <wim@iguana.be> | 2011-07-22 14:57:23 -0400 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2011-07-28 04:01:07 -0400 |
commit | c2dc00e494cc476551b9beeb883910391ff59737 (patch) | |
tree | 2dd417fb7e793af0bd28f9b946628662574269d4 /drivers/watchdog | |
parent | 2fa03560ab3a6dd83cad9bfd5692179fc2ceabb3 (diff) |
watchdog: WatchDog Timer Driver Core - Add WDIOC_KEEPALIVE ioctl
This part add's the WDIOC_KEEPALIVE ioctl functionality to the
WatchDog Timer Driver Core framework. Please note that the
WDIOF_KEEPALIVEPING bit has to be set in the watchdog_info
options field.
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r-- | drivers/watchdog/watchdog_dev.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/watchdog/watchdog_dev.c b/drivers/watchdog/watchdog_dev.c index 00a611293065..2fb4cecd50d8 100644 --- a/drivers/watchdog/watchdog_dev.c +++ b/drivers/watchdog/watchdog_dev.c | |||
@@ -120,6 +120,11 @@ static long watchdog_ioctl(struct file *file, unsigned int cmd, | |||
120 | return put_user(val, p); | 120 | return put_user(val, p); |
121 | case WDIOC_GETBOOTSTATUS: | 121 | case WDIOC_GETBOOTSTATUS: |
122 | return put_user(wdd->bootstatus, p); | 122 | return put_user(wdd->bootstatus, p); |
123 | case WDIOC_KEEPALIVE: | ||
124 | if (!(wdd->info->options & WDIOF_KEEPALIVEPING)) | ||
125 | return -EOPNOTSUPP; | ||
126 | watchdog_ping(wdd); | ||
127 | return 0; | ||
123 | default: | 128 | default: |
124 | return -ENOTTY; | 129 | return -ENOTTY; |
125 | } | 130 | } |