summaryrefslogtreecommitdiff
path: root/common/temp_sensor.c
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2012-05-21 10:29:23 -0700
committerRandall Spangler <rspangler@chromium.org>2012-05-21 14:57:08 -0700
commitb2c4ee6cf88baffa7f69b1551fcda0e468bae216 (patch)
tree57d84af558f9210220668dc159770b4571aa5710 /common/temp_sensor.c
parent1ac197d566d74b5dfd2abbd57c191e464aa46d8b (diff)
downloadchrome-ec-b2c4ee6cf88baffa7f69b1551fcda0e468bae216.tar.gz
Even more debug command cleanup to save space
BUG=none TEST=(run the commands) Change-Id: Ibc414ffd594e06dbdce64c51859b6f247bb10d36 Signed-off-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'common/temp_sensor.c')
-rw-r--r--common/temp_sensor.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/common/temp_sensor.c b/common/temp_sensor.c
index 9f615ae6d3..980d62d13b 100644
--- a/common/temp_sensor.c
+++ b/common/temp_sensor.c
@@ -104,25 +104,19 @@ void temp_sensor_task(void)
static int command_temps(int argc, char **argv)
{
int i;
- int rv = 0;
+ int rv = EC_SUCCESS;
int t;
- ccputs("Reading temperature sensors...\n");
-
for (i = 0; i < TEMP_SENSOR_COUNT; ++i) {
ccprintf(" %-20s: ", temp_sensors[i].name);
t = temp_sensor_read(i);
if (t < 0) {
ccprintf("Error\n");
- rv = -1;
- }
- else
+ rv = EC_ERROR_UNKNOWN;
+ } else
ccprintf("%d K = %d C\n", t, t - 273);
}
- if (rv == -1)
- return EC_ERROR_UNKNOWN;
-
- return EC_SUCCESS;
+ return rv;
}
DECLARE_CONSOLE_COMMAND(temps, command_temps);