From 63345435ac53949dc07b4ee7f31be4137b4132d1 Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Mon, 10 Feb 2020 14:09:50 +0100 Subject: watchdog: f71808e: only print reset reason if one's indicated On most resets, a "reset reason: unknown" would clutter the console, because the watchdog doesn't support differentiating between POR and RST. Reduce the clutter by only printing the message when we have something interesting to say (i.e. watchdog reset). Signed-off-by: Ahmad Fatoum Signed-off-by: Sascha Hauer --- drivers/watchdog/f71808e_wdt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/watchdog/f71808e_wdt.c b/drivers/watchdog/f71808e_wdt.c index 5307ab0b3e..6f2d30ec77 100644 --- a/drivers/watchdog/f71808e_wdt.c +++ b/drivers/watchdog/f71808e_wdt.c @@ -256,11 +256,11 @@ static int f71808e_wdt_init(struct f71808e_wdt *wd, struct device_d *dev) wdd->set_timeout = &f71808e_wdt_set_timeout; wdd->timeout_max = WATCHDOG_MAX_TIMEOUT; - if (wdt_conf & BIT(F71808FG_FLAG_WDTMOUT_STS)) - reset_source_set_priority(RESET_WDG, - RESET_SOURCE_DEFAULT_PRIORITY); + if (wdt_conf & BIT(F71808FG_FLAG_WDTMOUT_STS)) { + reset_source_set_priority(RESET_WDG, RESET_SOURCE_DEFAULT_PRIORITY); + dev_info(dev, "reset reason: WDT\n"); + } - dev_info(dev, "reset reason: %s\n", reset_source_name()); if (test_bit(F71808FG_FLAG_WD_EN, &wdt_conf)) wdd->running = WDOG_HW_RUNNING; -- cgit v1.2.3