diff options
author | Viresh Kumar <viresh.kumar@st.com> | 2012-03-16 04:14:00 -0400 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2012-03-27 14:15:37 -0400 |
commit | fd7b673c92731fc6c0b1e999adfd87b6762ee797 (patch) | |
tree | 35fafd733a2846acb1dd7a06cb7078a7fe59086f /drivers/watchdog | |
parent | 2ca1606359695cc7ce371c7829c4082d9095fc06 (diff) |
watchdog: Add support for WDIOC_GETTIMELEFT IOCTL in watchdog core
This patch adds support for WDIOC_GETTIMELEFT IOCTL in watchdog core. So, there
is another function pointer added to struct watchdog_ops, which can be passed by
drivers to support this IOCTL.
Related documentation is updated too.
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
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 c6e1b8dd80cc..8558da912c42 100644 --- a/drivers/watchdog/watchdog_dev.c +++ b/drivers/watchdog/watchdog_dev.c | |||
@@ -236,6 +236,11 @@ static long watchdog_ioctl(struct file *file, unsigned int cmd, | |||
236 | if (wdd->timeout == 0) | 236 | if (wdd->timeout == 0) |
237 | return -EOPNOTSUPP; | 237 | return -EOPNOTSUPP; |
238 | return put_user(wdd->timeout, p); | 238 | return put_user(wdd->timeout, p); |
239 | case WDIOC_GETTIMELEFT: | ||
240 | if (!wdd->ops->get_timeleft) | ||
241 | return -EOPNOTSUPP; | ||
242 | |||
243 | return put_user(wdd->ops->get_timeleft(wdd), p); | ||
239 | default: | 244 | default: |
240 | return -ENOTTY; | 245 | return -ENOTTY; |
241 | } | 246 | } |