aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/pc80/rtc
diff options
context:
space:
mode:
authorMartin Roth <martinroth@google.com>2017-06-24 14:07:25 -0600
committerMartin Roth <martinroth@google.com>2017-07-13 23:54:48 +0000
commit32c27c2f850c64cdbf78acd00f0c2ce4b535af64 (patch)
tree02eb0815d631f0f0e4859c3f43c6c81e3253feb1 /src/drivers/pc80/rtc
parente6ff1596e7417d24746162b3a567bcb6dd9ef988 (diff)
src/drivers: add IS_ENABLED() around Kconfig symbol references
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 <martinroth@google.com> Reviewed-on: https://review.coreboot.org/20352 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/drivers/pc80/rtc')
-rw-r--r--src/drivers/pc80/rtc/mc146818rtc.c2
-rw-r--r--src/drivers/pc80/rtc/mc146818rtc_romcc.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/drivers/pc80/rtc/mc146818rtc.c b/src/drivers/pc80/rtc/mc146818rtc.c
index 33860b8de3..0e9a88ab5c 100644
--- a/src/drivers/pc80/rtc/mc146818rtc.c
+++ b/src/drivers/pc80/rtc/mc146818rtc.c
@@ -28,7 +28,7 @@
#include <cbfs.h>
/* There's no way around this include guard. option_table.h is autogenerated */
-#if CONFIG_USE_OPTION_TABLE
+#if IS_ENABLED(CONFIG_USE_OPTION_TABLE)
#include "option_table.h"
#else
#define LB_CKS_RANGE_START 0
diff --git a/src/drivers/pc80/rtc/mc146818rtc_romcc.c b/src/drivers/pc80/rtc/mc146818rtc_romcc.c
index 8bebc4229d..dc4f2efec4 100644
--- a/src/drivers/pc80/rtc/mc146818rtc_romcc.c
+++ b/src/drivers/pc80/rtc/mc146818rtc_romcc.c
@@ -1,7 +1,7 @@
#include <stdint.h>
#include <pc80/mc146818rtc.h>
#include <fallback.h>
-#if CONFIG_USE_OPTION_TABLE
+#if IS_ENABLED(CONFIG_USE_OPTION_TABLE)
#include "option_table.h"
#endif
@@ -19,7 +19,7 @@ static int cmos_error(void)
static int cmos_chksum_valid(void)
{
-#if CONFIG_USE_OPTION_TABLE
+#if IS_ENABLED(CONFIG_USE_OPTION_TABLE)
unsigned char addr;
u16 sum, old_sum;
@@ -93,7 +93,7 @@ static inline __attribute__((unused)) int do_normal_boot(void)
unsigned read_option_lowlevel(unsigned start, unsigned size, unsigned def)
{
-#if CONFIG_USE_OPTION_TABLE
+#if IS_ENABLED(CONFIG_USE_OPTION_TABLE)
unsigned byte;
byte = cmos_read(start/8);