]> Pileus Git - ~andy/linux/blobdiff - drivers/watchdog/w83627hf_wdt.c
watchdog: w83627hf: Enable watchdog device only if not already enabled
[~andy/linux] / drivers / watchdog / w83627hf_wdt.c
index 910d437368219c8278152e985693c503f144092c..c5d34f46e7ad0ee0532ee7abd01855fde7b4ab3f 100644 (file)
@@ -107,7 +107,9 @@ static void w83627hf_init(struct watchdog_device *wdog)
        }
 
        outb_p(0x30, WDT_EFER); /* select CR30 */
-       outb_p(0x01, WDT_EFDR); /* set bit 0 to activate GPIO2 */
+       t = inb(WDT_EFDR);
+       if (!(t & 0x01))
+               outb_p(t | 0x01, WDT_EFDR); /* set bit 0 to activate GPIO2 */
 
        outb_p(0xF6, WDT_EFER); /* Select CRF6 */
        t = inb_p(WDT_EFDR);      /* read CRF6 */