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 <fido_max@inbox.ru>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
[groeck: Updated subject and description]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
This commit is contained in:
Maxim Kochetkov 2018-06-07 16:54:37 +03:00 committed by Wim Van Sebroeck
parent c2cf466cca
commit 2421cfd55a

View File

@ -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);