lkml.org 
[lkml]   [2014]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] Watchdog: Fixed the watchdog close/stop logic - only close the watchdog if the magic character was received and the magic close is supported.
On Mon, Dec 08, 2014 at 10:45:11AM -0700, Robert Yang wrote:
> From: ryang <ryang@hach.com>
>
> Signed-off-by: ryang <ryang@hach.com>
> ---
> drivers/watchdog/watchdog_dev.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/watchdog/watchdog_dev.c b/drivers/watchdog/watchdog_dev.c
> index 6aaefba..73793d8 100644
> --- a/drivers/watchdog/watchdog_dev.c
> +++ b/drivers/watchdog/watchdog_dev.c
> @@ -471,8 +471,8 @@ static int watchdog_release(struct inode *inode, struct file *file)
> */
> if (!test_bit(WDOG_ACTIVE, &wdd->status))
> err = 0;
> - else if (test_and_clear_bit(WDOG_ALLOW_RELEASE, &wdd->status) ||
> - !(wdd->info->options & WDIOF_MAGICCLOSE))
> + else if (test_and_clear_bit(WDOG_ALLOW_RELEASE, &wdd->status) &&
> + (wdd->info->options & WDIOF_MAGICCLOSE))
> err = watchdog_stop(wdd);
>
Why ?

Guenter


\
 
 \ /
  Last update: 2014-12-08 21:41    [W:0.051 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site