From 32c27c2f850c64cdbf78acd00f0c2ce4b535af64 Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Sat, 24 Jun 2017 14:07:25 -0600 Subject: src/drivers: add IS_ENABLED() around Kconfig symbol references MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some of these can be changed from #if to if(), but that will happen in a follow-on commmit. Change-Id: Ib3a1cf04482a8f19b159c31cfb16a7b492748d91 Signed-off-by: Martin Roth Reviewed-on: https://review.coreboot.org/20352 Tested-by: build bot (Jenkins) Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Stefan Reinauer --- src/drivers/elog/boot_count.c | 2 +- src/drivers/elog/elog.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/drivers/elog') diff --git a/src/drivers/elog/boot_count.c b/src/drivers/elog/boot_count.c index 6e9fcaba3a..f1ae9d8f66 100644 --- a/src/drivers/elog/boot_count.c +++ b/src/drivers/elog/boot_count.c @@ -27,7 +27,7 @@ * This can either be declared as part of the option * table or statically defined in the board config. */ -#if CONFIG_USE_OPTION_TABLE +#if IS_ENABLED(CONFIG_USE_OPTION_TABLE) # include "option_table.h" # define BOOT_COUNT_CMOS_OFFSET (CMOS_VSTART_boot_count_offset >> 3) #else diff --git a/src/drivers/elog/elog.c b/src/drivers/elog/elog.c index 27b6e2970d..1c175614c5 100644 --- a/src/drivers/elog/elog.c +++ b/src/drivers/elog/elog.c @@ -13,13 +13,13 @@ * GNU General Public License for more details. */ -#if CONFIG_HAVE_ACPI_RESUME == 1 +#if IS_ENABLED(CONFIG_HAVE_ACPI_RESUME) #include #endif #include #include #include -#if CONFIG_ARCH_X86 +#if IS_ENABLED(CONFIG_ARCH_X86) #include #endif #include @@ -786,8 +786,8 @@ int elog_init(void) #if !defined(__SMM__) /* Log boot count event except in S3 resume */ -#if CONFIG_ELOG_BOOT_COUNT == 1 -#if CONFIG_HAVE_ACPI_RESUME == 1 +#if IS_ENABLED(CONFIG_ELOG_BOOT_COUNT) +#if IS_ENABLED(CONFIG_HAVE_ACPI_RESUME) if (!acpi_is_wakeup_s3()) #endif elog_add_event_dword(ELOG_TYPE_BOOT, boot_count_read()); @@ -796,9 +796,9 @@ int elog_init(void) elog_add_event_dword(ELOG_TYPE_BOOT, 0); #endif -#if CONFIG_ARCH_X86 +#if IS_ENABLED(CONFIG_ARCH_X86) /* Check and log POST codes from previous boot */ - if (CONFIG_CMOS_POST) + if (IS_ENABLED(CONFIG_CMOS_POST)) cmos_post_log(); #endif #endif -- cgit v1.2.3