From dad376eada6d4e31550e4b241fb3e765d6e69ea7 Mon Sep 17 00:00:00 2001 From: Randall Spangler Date: Mon, 10 Feb 2014 16:08:33 -0800 Subject: [PATCH] baytrail: Battery cutoff return codes were backwards cutoff() returns 0 on success, not non-zero. BUG=chrome-os-partner:25646 BRANCH=rambi TEST=ectool batterycutoff succeeds Change-Id: Icca0c53aba82381b73dd679de5df3a97153d0662 Signed-off-by: Randall Spangler Reviewed-on: https://chromium-review.googlesource.com/185737 Reviewed-by: Benson Leung Reviewed-by: Dave Parker --- board/rambi/battery.c | 2 +- board/squawks/battery.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/board/rambi/battery.c b/board/rambi/battery.c index 622d903d22..3c031d6480 100644 --- a/board/rambi/battery.c +++ b/board/rambi/battery.c @@ -48,7 +48,7 @@ static int cutoff(void) static int battery_command_cut_off(struct host_cmd_handler_args *args) { - return cutoff() ? EC_RES_SUCCESS : EC_RES_ERROR; + return cutoff() ? EC_RES_ERROR : EC_RES_SUCCESS; } DECLARE_HOST_COMMAND(EC_CMD_BATTERY_CUT_OFF, battery_command_cut_off, EC_VER_MASK(0)); diff --git a/board/squawks/battery.c b/board/squawks/battery.c index 156818d7fd..7c8d140d5b 100644 --- a/board/squawks/battery.c +++ b/board/squawks/battery.c @@ -53,7 +53,7 @@ static int cutoff(void) static int battery_command_cut_off(struct host_cmd_handler_args *args) { - return cutoff() ? EC_RES_SUCCESS : EC_RES_ERROR; + return cutoff() ? EC_RES_ERROR : EC_RES_SUCCESS; } DECLARE_HOST_COMMAND(EC_CMD_BATTERY_CUT_OFF, battery_command_cut_off, EC_VER_MASK(0));