lkml.org 
[lkml]   [2011]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 06/11] watchdog: WatchDog Timer Driver Core - Add Magic Close feature
>  static int watchdog_release(struct inode *inode, struct file *file)
> {
> - int err;
> + int err = -EBUSY;
> +
> + /*
> + * We only stop the watchdog if we received the magic character
> + * or if WDIOF_MAGICCLOSE is not set
> + */
> + if (test_and_clear_bit(WDOG_ALLOW_RELEASE, &wdd->status) ||
> + !(wdd->info->options & WDIOF_MAGICCLOSE))
> + err = watchdog_stop(wdd);
>
> - /* stop the watchdog */
> - err = watchdog_stop(wdd);
> + /* If the watchdog was not stopped, sent a keepalive ping */

s/sent/send/

> if (err < 0) {
> pr_crit("%s: watchdog did not stop!\n", wdd->info->identity);
> watchdog_ping(wdd);

--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2011-07-11 23:37    [from the cache]
©2003-2011 Jasper Spaans