[PATCH] watchdog: fix nowayout setting in wm831x_wdt

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

 



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@xxxxxxxxxx>
---

 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;
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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