From: Pratyush Anand Date: Tue, 31 May 2016 06:08:10 +0000 (+0800) Subject: watchdog: sbsa: Set WDOG_HW_RUNNING, when watchdog is already running. X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c3c1e29c8ad11dec67d01203759272da0d0df3aa;p=linux-beck.git watchdog: sbsa: Set WDOG_HW_RUNNING, when watchdog is already running. This patch uses the new flag WDOG_HW_RUNNING in driver. According to the definition of this flag, it should be set, if watchdog is running after booting, before it's opened. Signed-off-by: Pratyush Anand Signed-off-by: Fu Wei Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck --- diff --git a/drivers/watchdog/sbsa_gwdt.c b/drivers/watchdog/sbsa_gwdt.c index 6af71e07f309..cc885f1c1850 100644 --- a/drivers/watchdog/sbsa_gwdt.c +++ b/drivers/watchdog/sbsa_gwdt.c @@ -283,6 +283,8 @@ static int sbsa_gwdt_probe(struct platform_device *pdev) dev_warn(dev, "System reset by WDT.\n"); wdd->bootstatus |= WDIOF_CARDRESET; } + if (status & SBSA_GWDT_WCS_EN) + set_bit(WDOG_HW_RUNNING, &wdd->status); if (action) { irq = platform_get_irq(pdev, 0);