commit | b4eec7eb5e0408ecc0e450025dbb5ab3fe6cbc5c | [log] [tgz] |
---|---|---|
author | Daniel Lezcano <daniel.lezcano@linaro.org> | Thu Feb 18 16:44:55 2016 +0000 |
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | Thu Feb 18 16:47:34 2016 +0000 |
tree | ef61a1289d04949023979220791302ec0655bdc4 | |
parent | 30f014726a0614f0e331c67604729723306007e1 [diff] [blame] |
Pass options to init functions. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
diff --git a/sensor.c b/sensor.c index 008b662..3b37bc6 100644 --- a/sensor.c +++ b/sensor.c
@@ -295,10 +295,13 @@ .display = sensor_display, }; -int sensor_init(void) +int sensor_init(struct powerdebug_options *options) { int ret = 0; + if (!(options->flags & SENSOR_OPTION)) + return 0; + ret = display_register(SENSOR, &sensor_ops); if (ret) printf("error: sensor display register failed");