From 0b1ffec27b0dca8d57d8bfd6a9c3da62fe851812 Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Mon, 10 Feb 2020 14:09:51 +0100 Subject: reset_source: migrate from reset_source_name to reset_source_to_string Whether reset_source_name() returns the just set reset_source is dependent on probe order and the priorities of prior reset sources in relation to the current one. Make this more robust by using the new reset_source_to_string. Signed-off-by: Ahmad Fatoum Signed-off-by: Sascha Hauer --- drivers/watchdog/stm32_iwdg.c | 2 +- drivers/watchdog/stpmic1_wdt.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/watchdog/stm32_iwdg.c b/drivers/watchdog/stm32_iwdg.c index c7a5cb9caa..4cd36a67fa 100644 --- a/drivers/watchdog/stm32_iwdg.c +++ b/drivers/watchdog/stm32_iwdg.c @@ -185,7 +185,7 @@ static int stm32_set_reset_reason(struct regmap *rcc) reset_source_set_prinst(type, RESET_SOURCE_DEFAULT_PRIORITY, instance); pr_info("STM32 RCC reset reason %s (MP_RSTSR: 0x%08x)\n", - reset_source_name(), reg); + reset_source_to_string(type), reg); return 0; } diff --git a/drivers/watchdog/stpmic1_wdt.c b/drivers/watchdog/stpmic1_wdt.c index 40273ffc4c..458c5c16a3 100644 --- a/drivers/watchdog/stpmic1_wdt.c +++ b/drivers/watchdog/stpmic1_wdt.c @@ -152,7 +152,7 @@ static int stpmic1_set_reset_reason(struct regmap *map) reset_source_set_prinst(type, 400, instance); pr_info("STPMIC1 reset reason %s (RREQ_STATE_SR: 0x%08x)\n", - reset_source_name(), reg); + reset_source_to_string(type), reg); return 0; } -- cgit v1.2.3