summaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/ts72xx_wdt.c
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@iki.fi>2010-08-29 12:53:14 +0200
committerWim Van Sebroeck <wim@iguana.be>2010-09-15 20:43:52 +0200
commit0e901bed4e053098f1c8411dcbf21324b7f61775 (patch)
treedeba6a680ecebf3b806f71d272af530ba67c2a83 /drivers/watchdog/ts72xx_wdt.c
parentwatchdog: sb_wdog: release irq and reboot notifier in error path and module_e... (diff)
downloadlinux-0e901bed4e053098f1c8411dcbf21324b7f61775.tar.xz
linux-0e901bed4e053098f1c8411dcbf21324b7f61775.zip
watchdog: ts72xx_wdt: disable watchdog at probe
Since it may be already enabled by bootloader or some other utility. This patch makes sure that the watchdog is disabled before any userspace daemon opens the device. It is also required by the watchdog API. Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog/ts72xx_wdt.c')
-rw-r--r--drivers/watchdog/ts72xx_wdt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/watchdog/ts72xx_wdt.c b/drivers/watchdog/ts72xx_wdt.c
index 458c499c1223..18cdeb4c4258 100644
--- a/drivers/watchdog/ts72xx_wdt.c
+++ b/drivers/watchdog/ts72xx_wdt.c
@@ -449,6 +449,9 @@ static __devinit int ts72xx_wdt_probe(struct platform_device *pdev)
wdt->pdev = pdev;
mutex_init(&wdt->lock);
+ /* make sure that the watchdog is disabled */
+ ts72xx_wdt_stop(wdt);
+
error = misc_register(&ts72xx_wdt_miscdev);
if (error) {
dev_err(&pdev->dev, "failed to register miscdev\n");