summaryrefslogtreecommitdiff
path: root/drivers/watchdog
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@iki.fi>2010-08-29 13:53:14 +0300
committerWim Van Sebroeck <wim@iguana.be>2010-09-15 18:43:52 +0000
commit0e901bed4e053098f1c8411dcbf21324b7f61775 (patch)
treedeba6a680ecebf3b806f71d272af530ba67c2a83 /drivers/watchdog
parentae44855ae8b36e4194a0a43eec6351e81f880955 (diff)
downloadlinux-0e901bed4e053098f1c8411dcbf21324b7f61775.tar.gz
linux-0e901bed4e053098f1c8411dcbf21324b7f61775.tar.xz
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')
-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");