[PATCH 2/4] watchdog: f71808e: only print reset reason if one's indicated

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <a.fatoum@xxxxxxxxxxxxxx>
---
 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 5307ab0b3ead..6f2d30ec77aa 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;
-- 
2.25.0


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux