From: Maxim Kochetkov Date: Thu, 7 Jun 2018 13:54:37 +0000 (+0300) Subject: watchdog: orion_wdt: Mark watchdog as active when running at probe X-Git-Tag: for-linus-20180825~43^2~10 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=2421cfd55a80af3272c261a28864cc5c3c67155c;p=linux-block.git 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 --- 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);