From 2421cfd55a80af3272c261a28864cc5c3c67155c Mon Sep 17 00:00:00 2001 From: Maxim Kochetkov Date: Thu, 7 Jun 2018 16:54:37 +0300 Subject: [PATCH] watchdog: orion_wdt: Mark watchdog as active when running at probe If the watchdog is fully enabled and running at probe, mark it as such so the watchdog core can handle it until the watchdog device is opened. Signed-off-by: Maxim Kochetkov Reviewed-by: Guenter Roeck [groeck: Updated subject and description] Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck --- drivers/watchdog/orion_wdt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/watchdog/orion_wdt.c b/drivers/watchdog/orion_wdt.c index ea676d233e1e..9db3b09f7568 100644 --- a/drivers/watchdog/orion_wdt.c +++ b/drivers/watchdog/orion_wdt.c @@ -581,6 +581,8 @@ static int orion_wdt_probe(struct platform_device *pdev) */ if (!orion_wdt_enabled(&dev->wdt)) orion_wdt_stop(&dev->wdt); + else + set_bit(WDOG_HW_RUNNING, &dev->wdt.status); /* Request the IRQ only after the watchdog is disabled */ irq = platform_get_irq(pdev, 0);