mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] watchdog: fix nowayout setting in wm831x_wdt
@ 2011-11-25 22:55 Marc Vertes
  2011-11-25 23:01 ` Marc Vertes
  0 siblings, 1 reply; 2+ messages in thread
From: Marc Vertes @ 2011-11-25 22:55 UTC (permalink / raw)
  To: Wim Van Sebroeck; +Cc: linux-kernel, linux-watchdog, Mark Brown

Use set_bit() to set the nowayout flag, as WDOG_NO_WAY_OUT is a
bit number, not a mask. It avoids corruption of status flag.

Signed-off-by: Marc Vertes <marc.vertes@sigfox.com>
---

 wm831x_wdt.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-3.2-rc3/drivers/watchdog/wm831x_wdt.c.orig	2011-11-24 05:20:28.000000000 +0100
+++ linux-3.2-rc3/drivers/watchdog/wm831x_wdt.c	2011-11-25 23:22:22.447258730 +0100
@@ -216,7 +216,7 @@ static int __devinit wm831x_wdt_probe(st
 	watchdog_set_drvdata(wm831x_wdt, driver_data);
 
 	if (nowayout)
-		wm831x_wdt->status |= WDOG_NO_WAY_OUT;
+		setbit(WDOG_NO_WAY_OUT, &wm831x_wdt->status);
 
 	reg = wm831x_reg_read(wm831x, WM831X_WATCHDOG);
 	reg &= WM831X_WDOG_TO_MASK;

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-11-26  0:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-25 22:55 [PATCH] watchdog: fix nowayout setting in wm831x_wdt Marc Vertes
2011-11-25 23:01 ` Marc Vertes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®