diff options
author | Ingo Molnar <mingo@kernel.org> | 2012-04-14 13:18:27 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-04-14 13:19:04 +0200 |
commit | 6ac1ef482d7ae0c690f1640bf6eb818ff9a2d91e (patch) | |
tree | 021cc9f6b477146fcebe6f3be4752abfa2ba18a9 /drivers/watchdog/watchdog_dev.c | |
parent | 682968e0c425c60f0dde37977e5beb2b12ddc4cc (diff) | |
parent | a385ec4f11bdcf81af094c03e2444ee9b7fad2e5 (diff) |
Merge branch 'perf/core' into perf/uprobes
Merge in latest upstream (and the latest perf development tree),
to prepare for tooling changes, and also to pick up v3.4 MM
changes that the uprobes code needs to take care of.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/watchdog/watchdog_dev.c')
-rw-r--r-- | drivers/watchdog/watchdog_dev.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/watchdog/watchdog_dev.c b/drivers/watchdog/watchdog_dev.c index 1199da0f98c..8558da912c4 100644 --- a/drivers/watchdog/watchdog_dev.c +++ b/drivers/watchdog/watchdog_dev.c @@ -226,7 +226,6 @@ static long watchdog_ioctl(struct file *file, unsigned int cmd, err = wdd->ops->set_timeout(wdd, val); if (err < 0) return err; - wdd->timeout = val; /* If the watchdog is active then we send a keepalive ping * to make sure that the watchdog keep's running (and if * possible that it takes the new timeout) */ @@ -237,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; } @@ -347,7 +351,7 @@ int watchdog_dev_register(struct watchdog_device *watchdog) /* Only one device can register for /dev/watchdog */ if (test_and_set_bit(0, &watchdog_dev_busy)) { - pr_err("only one watchdog can use /dev/watchdog.\n"); + pr_err("only one watchdog can use /dev/watchdog\n"); return -EBUSY; } @@ -355,8 +359,8 @@ int watchdog_dev_register(struct watchdog_device *watchdog) err = misc_register(&watchdog_miscdev); if (err != 0) { - pr_err("%s: cannot register miscdev on minor=%d (err=%d).\n", - watchdog->info->identity, WATCHDOG_MINOR, err); + pr_err("%s: cannot register miscdev on minor=%d (err=%d)\n", + watchdog->info->identity, WATCHDOG_MINOR, err); goto out; } @@ -383,8 +387,8 @@ int watchdog_dev_unregister(struct watchdog_device *watchdog) /* We can only unregister the watchdog device that was registered */ if (watchdog != wdd) { - pr_err("%s: watchdog was not registered as /dev/watchdog.\n", - watchdog->info->identity); + pr_err("%s: watchdog was not registered as /dev/watchdog\n", + watchdog->info->identity); return -ENODEV; } |