From c6250f94edb7765d0cff198cb0ac87f75e556276 Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Mon, 10 Feb 2020 14:09:49 +0100 Subject: reset_source: introduce reset_source_to_string We have a few places where driver code prints reset_source_name() to console after setting the reset source. This working is probe order dependent, because reset_source_name() prints the highest priority reset_source so far, which doesn't necessarily have to be the one that was just computed. Implement reset_source_to_string, so drivers can be migrated to use it. Signed-off-by: Ahmad Fatoum Signed-off-by: Sascha Hauer --- common/reset_source.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'common') diff --git a/common/reset_source.c b/common/reset_source.c index 8fdf052157..343dc08444 100644 --- a/common/reset_source.c +++ b/common/reset_source.c @@ -42,11 +42,11 @@ enum reset_src_type reset_source_get(void) } EXPORT_SYMBOL(reset_source_get); -const char *reset_source_name(void) +const char *reset_source_to_string(enum reset_src_type st) { - return reset_src_names[reset_source]; + return reset_src_names[st]; } -EXPORT_SYMBOL(reset_source_name); +EXPORT_SYMBOL(reset_source_to_string); int reset_source_get_instance(void) { -- cgit v1.2.3