summaryrefslogtreecommitdiffstats
path: root/src/device/device.c
diff options
context:
space:
mode:
authorMartin Roth <martinroth@google.com>2017-06-24 14:00:01 -0600
committerMartin Roth <martinroth@google.com>2017-06-28 17:48:57 +0000
commitb3b114c28f6e7c11b327fce84d93141498d5f665 (patch)
tree4ca1b11a12b72dded9f8bf96ec39691621239400 /src/device/device.c
parentebade5dec9e05291f64b0687130d6fbce52270f0 (diff)
downloadcoreboot-b3b114c28f6e7c11b327fce84d93141498d5f665.tar.gz
coreboot-b3b114c28f6e7c11b327fce84d93141498d5f665.tar.bz2
coreboot-b3b114c28f6e7c11b327fce84d93141498d5f665.zip
src/device: 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: I66cde1adcf373889b03f144793c0b4f46d21ca31 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/20338 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/device/device.c')
-rw-r--r--src/device/device.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/device/device.c b/src/device/device.c
index 0231ec72c97e..35f5909c6f1d 100644
--- a/src/device/device.c
+++ b/src/device/device.c
@@ -46,7 +46,7 @@
#include <stdlib.h>
#include <string.h>
#include <smp/spinlock.h>
-#if CONFIG_ARCH_X86
+#if IS_ENABLED(CONFIG_ARCH_X86)
#include <arch/ebda.h>
#endif
#include <timer.h>
@@ -102,7 +102,7 @@ void dev_finalize_chips(void)
DECLARE_SPIN_LOCK(dev_lock)
-#if CONFIG_GFXUMA
+#if IS_ENABLED(CONFIG_GFXUMA)
/* IGD UMA memory */
uint64_t uma_memory_base = 0;
uint64_t uma_memory_size = 0;
@@ -1130,7 +1130,7 @@ static void init_dev(struct device *dev)
return;
if (!dev->initialized && dev->ops && dev->ops->init) {
-#if CONFIG_HAVE_MONOTONIC_TIMER
+#if IS_ENABLED(CONFIG_HAVE_MONOTONIC_TIMER)
struct stopwatch sw;
stopwatch_init(&sw);
#endif
@@ -1142,7 +1142,7 @@ static void init_dev(struct device *dev)
printk(BIOS_DEBUG, "%s init ...\n", dev_path(dev));
dev->initialized = 1;
dev->ops->init(dev);
-#if CONFIG_HAVE_MONOTONIC_TIMER
+#if IS_ENABLED(CONFIG_HAVE_MONOTONIC_TIMER)
printk(BIOS_DEBUG, "%s init finished in %ld usecs\n", dev_path(dev),
stopwatch_duration_usecs(&sw));
#endif
@@ -1178,7 +1178,7 @@ void dev_initialize(void)
printk(BIOS_INFO, "Initializing devices...\n");
-#if CONFIG_ARCH_X86
+#if IS_ENABLED(CONFIG_ARCH_X86)
/* Ensure EBDA is prepared before Option ROMs. */
setup_default_ebda();
#endif