Re: [PATCH 06/11] watchdog: WatchDog Timer Driver Core - Add MagicClose feature
From: Wolfram Sang
Date: Mon Jul 11 2011 - 17:35:24 EST
> 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/ |
Attachment:
signature.asc
Description: Digital signature