mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
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 <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
This commit is contained in:
parent
2ca1606359
commit
fd7b673c92
4 changed files with 14 additions and 1 deletions
|
|
@ -236,6 +236,11 @@ static long watchdog_ioctl(struct file *file, unsigned int cmd,
|
|||
if (wdd->timeout == 0)
|
||||
return -EOPNOTSUPP;
|
||||
return put_user(wdd->timeout, p);
|
||||
case WDIOC_GETTIMELEFT:
|
||||
if (!wdd->ops->get_timeleft)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
return put_user(wdd->ops->get_timeleft(wdd), p);
|
||||
default:
|
||||
return -ENOTTY;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue