Re: [PATCH 06/11] watchdog: WatchDog Timer Driver Core - Add Magic Close feature

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>  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


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux