aboutsummaryrefslogtreecommitdiff
path: root/sensor.c
diff options
context:
space:
mode:
Diffstat (limited to 'sensor.c')
-rw-r--r--sensor.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/sensor.c b/sensor.c
index cdc86b2..e054a7b 100644
--- a/sensor.c
+++ b/sensor.c
@@ -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()) {