summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Palatin <vpalatin@chromium.org>2015-03-25 12:31:39 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-03-26 19:56:07 +0000
commit255bf12ffb54c590af931207dcccbbd41af25e9f (patch)
tree281f5459fc2cbaf064586f46664a270994e6c0b4
parent6ee7b1e34eecd585074b4aae0347ed12f632ead0 (diff)
downloadchrome-ec-255bf12ffb54c590af931207dcccbbd41af25e9f.tar.gz
charge_state_v2: properly print static battery info errors
When calling problem() with 0 as value, it's never printed on the EC console since the problem() function is de-duplicating the messages by checking against the last value (which is initialized at zero). Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=none BUG=chrome-os-partner:38401 TEST=run on the current Ryu code (which has a faulty BQ27742 driver) and see the "charge problem: static update [...]" message. Change-Id: Iedfbc95e3751bc5b22452187b404a09b633160d7 Reviewed-on: https://chromium-review.googlesource.com/262448 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Alec Berg <alecaberg@chromium.org> Commit-Queue: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r--common/charge_state_v2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/charge_state_v2.c b/common/charge_state_v2.c
index 7b20c52eef..f693f99482 100644
--- a/common/charge_state_v2.c
+++ b/common/charge_state_v2.c
@@ -165,7 +165,7 @@ static int update_static_battery_info(void)
host_unlock_memmap();
if (rv)
- problem(PR_STATIC_UPDATE, 0);
+ problem(PR_STATIC_UPDATE, rv);
else
/* No errors seen. Battery data is now present */
*host_get_memmap(EC_MEMMAP_BATTERY_VERSION) = 1;