[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110711213518.GG5811@pengutronix.de>
Date: Mon, 11 Jul 2011 23:35:18 +0200
From: Wolfram Sang <w.sang@...gutronix.de>
To: Wim Van Sebroeck <wim@...ana.be>
Cc: LKML <linux-kernel@...r.kernel.org>,
Linux Watchdog Mailing List <linux-watchdog@...r.kernel.org>,
Alan Cox <alan@...rguk.ukuu.org.uk>
Subject: Re: [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/ |
Download attachment "signature.asc" of type "application/pgp-signature" (199 bytes)
Powered by blists - more mailing lists