summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-08-26 12:01:04 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2015-08-27 21:37:07 +0200
commitff2a4a0a138d6cb6addb5a855ea57a0332626d3c (patch)
tree9ea122ee78dfd5f003242aadb78a2f533cb3c5b1
parent62fe28cf0b06ad526e5ef2fcfd3f02c20cfb0bd8 (diff)
downloadbarebox-ff2a4a0a138d6cb6addb5a855ea57a0332626d3c.tar.gz
reset-source: Use globalvar_add_simple_enum
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--common/reset_source.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/common/reset_source.c b/common/reset_source.c
index 80002a9..f9ee99b 100644
--- a/common/reset_source.c
+++ b/common/reset_source.c
@@ -40,15 +40,13 @@ EXPORT_SYMBOL(reset_source_get);
void reset_source_set(enum reset_src_type st)
{
reset_source = st;
-
- globalvar_add_simple("system.reset", reset_src_names[reset_source]);
}
EXPORT_SYMBOL(reset_source_set);
-/* ensure this runs after the 'global' device is already registerd */
static int reset_source_init(void)
{
- reset_source_set(reset_source);
+ globalvar_add_simple_enum("system.reset", (unsigned int *)&reset_source,
+ reset_src_names, ARRAY_SIZE(reset_src_names));
return 0;
}