diff options
author | Daniel Lezcano <daniel.lezcano@linaro.org> | 2016-02-22 11:05:51 +0000 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2016-02-22 11:05:51 +0000 |
commit | 1eedd480214d97dd80defc19b0849ea45cd692ef (patch) | |
tree | 1fc17e88ec55215d133f622505ae07b2575cb4ea /sensor.c | |
parent | 627d28d60f885fed586695f2837b097026afd883 (diff) |
Revert "display error on module window"
This reverts commit 96f6e050107da5d258280b785e5ed410d534a775.
Conflicts:
gpio.c
regulator.c
sensor.c
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Diffstat (limited to 'sensor.c')
-rw-r--r-- | sensor.c | 18 |
1 files changed, 1 insertions, 17 deletions
@@ -37,7 +37,6 @@ #define SYSFS_SENSOR "/sys/class/hwmon" static struct tree *sensor_tree; -static bool sensor_error = false; struct temp_info { char name[NAME_MAX]; @@ -279,12 +278,6 @@ static int sensor_print_info(struct tree *tree) static int sensor_display(bool refresh) { - if (sensor_error) { - display_message(SENSOR, - "error: path " SYSFS_SENSOR " not found"); - return -2; - } - if (refresh && read_sensor_info(sensor_tree)) return -1; @@ -297,18 +290,9 @@ static struct display_ops sensor_ops = { 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"); - - if (access(SYSFS_SENSOR, F_OK)) - sensor_error = true; /* set the flag */ - sensor_tree = tree_load(SYSFS_SENSOR, sensor_filter_cb, false); if (!sensor_tree) return -1; @@ -316,5 +300,5 @@ int sensor_init(struct powerdebug_options *options) if (fill_sensor_tree()) return -1; - return ret; + return display_register(SENSOR, &sensor_ops); } |