From be5317f6d0084b1997ff7342fbf5a5af3eecd950 Mon Sep 17 00:00:00 2001 From: Kyösti Mälkki Date: Wed, 6 Nov 2019 12:07:21 +0200 Subject: ELOG: Avoid some preprocessor use MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I8daf8868af2e8c2b07b0dda0eeaf863f2f550c59 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/36648 Reviewed-by: Aaron Durbin Tested-by: build bot (Jenkins) --- src/ec/quanta/ene_kb3940q/ec.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/ec') diff --git a/src/ec/quanta/ene_kb3940q/ec.c b/src/ec/quanta/ene_kb3940q/ec.c index 4fc38da99d..5de6336040 100644 --- a/src/ec/quanta/ene_kb3940q/ec.c +++ b/src/ec/quanta/ene_kb3940q/ec.c @@ -125,11 +125,11 @@ void ec_mem_write(u8 addr, u8 data) static void ene_kb3940q_log_events(void) { -#if CONFIG(ELOG) - u8 reason = ec_mem_read(EC_SHUTDOWN_REASON); - if (reason) - elog_add_event_byte(ELOG_TYPE_EC_SHUTDOWN, reason); -#endif + if (CONFIG(ELOG)) { + u8 reason = ec_mem_read(EC_SHUTDOWN_REASON); + if (reason) + elog_add_event_byte(ELOG_TYPE_EC_SHUTDOWN, reason); + } } static void ene_kb3940q_init(struct device *dev) -- cgit v1.2.3