提交 0e901bed 编写于 作者: M Mika Westerberg 提交者: Wim Van Sebroeck

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: NMika Westerberg <mika.westerberg@iki.fi>
Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
上级 ae44855a
...@@ -449,6 +449,9 @@ static __devinit int ts72xx_wdt_probe(struct platform_device *pdev) ...@@ -449,6 +449,9 @@ static __devinit int ts72xx_wdt_probe(struct platform_device *pdev)
wdt->pdev = pdev; wdt->pdev = pdev;
mutex_init(&wdt->lock); mutex_init(&wdt->lock);
/* make sure that the watchdog is disabled */
ts72xx_wdt_stop(wdt);
error = misc_register(&ts72xx_wdt_miscdev); error = misc_register(&ts72xx_wdt_miscdev);
if (error) { if (error) {
dev_err(&pdev->dev, "failed to register miscdev\n"); dev_err(&pdev->dev, "failed to register miscdev\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册