summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;
}