summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2020-02-10 14:09:49 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2020-02-19 09:18:05 +0100
commitc6250f94edb7765d0cff198cb0ac87f75e556276 (patch)
tree4f2fa4b178a7b62bbae99146573aeaa653decc8a /common
parentc9322d4feab59fc4d05996d2c3d02eae50336be0 (diff)
downloadbarebox-c6250f94edb7765d0cff198cb0ac87f75e556276.tar.gz
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 <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common')
-rw-r--r--common/reset_source.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/reset_source.c b/common/reset_source.c
index 8fdf052..343dc08 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)
{