diff options
Diffstat (limited to 'sensor.c')
-rw-r--r-- | sensor.c | 19 |
1 files changed, 11 insertions, 8 deletions
@@ -77,14 +77,6 @@ static int sensor_dump_cb(struct tree *tree, void *data) return 0; } -int sensor_dump(void) -{ - printf("\nSensor Information:\n"); - printf("*******************\n\n"); - - return tree_for_each(sensor_tree, sensor_dump_cb, NULL); -} - static struct sensor_info *sensor_alloc(void) { struct sensor_info *sensor; @@ -291,6 +283,17 @@ static int sensor_load_info(void) return 0; } +int sensor_dump(void) +{ + if (sensor_load_info()) + return -1; + + printf("\nSensor Information:\n"); + printf("*******************\n\n"); + + return tree_for_each(sensor_tree, sensor_dump_cb, NULL); +} + static int sensor_display(bool refresh) { if (sensor_load_info()) { |