aboutsummaryrefslogtreecommitdiff
path: root/src/mainboard/google/parrot/smihandler.c
diff options
context:
space:
mode:
authorPaul Menzel <paulepanter@users.sourceforge.net>2013-10-21 20:23:35 +0200
committerStefan Reinauer <stefan.reinauer@coreboot.org>2013-11-26 19:23:54 +0100
commit5679e5a4b6ddf32a3a5291913a353037938473ae (patch)
treea0c5941877c12e582d033e946e64cce76f05a689 /src/mainboard/google/parrot/smihandler.c
parent4aab71aae4e9a30fa61aab10947869f3430be4ee (diff)
google/parrot/smihandler.c: Use `battery_critical_logged` only with `ELOG_GSMI`
Make the declaration and use of it conditional on the ELOG_GSMI Kconfig variable. Change-Id: I2ef291d2f3e7d35545014e03ba8e0045da6050e5 Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-on: http://review.coreboot.org/3987 Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/mainboard/google/parrot/smihandler.c')
-rw-r--r--src/mainboard/google/parrot/smihandler.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mainboard/google/parrot/smihandler.c b/src/mainboard/google/parrot/smihandler.c
index 72a3a1b61a..4a189f8695 100644
--- a/src/mainboard/google/parrot/smihandler.c
+++ b/src/mainboard/google/parrot/smihandler.c
@@ -94,7 +94,9 @@ static u8 mainboard_smi_ec(void)
{
u8 src;
u32 pm1_cnt;
+#if CONFIG_ELOG_GSMI
static int battery_critical_logged;
+#endif
ec_kbc_write_cmd(0x56);
src = ec_kbc_read_ob();
@@ -106,8 +108,8 @@ static u8 mainboard_smi_ec(void)
if (!battery_critical_logged)
elog_add_event_byte(ELOG_TYPE_EC_EVENT,
EC_EVENT_BATTERY_CRITICAL);
-#endif
battery_critical_logged = 1;
+#endif
break;
case EC_LID_CLOSE:
printk(BIOS_DEBUG, "LID CLOSED, SHUTDOWN\n");