瀏覽代碼

[WATCHDOG] s3c2410_wdt.c stop watchdog after boot

If the s3c2410 watchdog timer is not enabled by
the driver at startup, ensure that it is stopped
in-case the boot process has enabled it.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Ben Dooks 19 年之前
父節點
當前提交
655516c80c
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      drivers/char/watchdog/s3c2410_wdt.c

+ 6 - 0
drivers/char/watchdog/s3c2410_wdt.c

@@ -423,6 +423,12 @@ static int s3c2410wdt_probe(struct platform_device *pdev)
 	if (tmr_atboot && started == 0) {
 		printk(KERN_INFO PFX "Starting Watchdog Timer\n");
 		s3c2410wdt_start();
+	} else if (!tmr_atboot) {
+		/* if we're not enabling the watchdog, then ensure it is
+		 * disabled if it has been left running from the bootloader
+		 * or other source */
+
+		s3c2410wdt_stop();
 	}
 
 	return 0;