src/lib: 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: Idcea3f8b1a4246cb6b29999a84a191a3133e5c78
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/20341
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
Martin Roth
2017-06-24 14:16:38 -06:00
parent 5764cbbf91
commit 1bf55b4070
8 changed files with 39 additions and 39 deletions

View File

@ -33,7 +33,7 @@
#include <boot/tables.h>
#include <program_loading.h>
#include <lib.h>
#if CONFIG_HAVE_ACPI_RESUME
#if IS_ENABLED(CONFIG_HAVE_ACPI_RESUME)
#include <arch/acpi.h>
#endif
#include <timer.h>
@ -82,7 +82,7 @@ struct boot_state {
boot_state_t (*run_state)(void *arg);
void *arg;
int complete : 1;
#if CONFIG_HAVE_MONOTONIC_TIMER
#if IS_ENABLED(CONFIG_HAVE_MONOTONIC_TIMER)
struct boot_state_times times;
#endif
};
@ -180,7 +180,7 @@ static boot_state_t bs_post_device(void *arg)
static boot_state_t bs_os_resume_check(void *arg)
{
#if CONFIG_HAVE_ACPI_RESUME
#if IS_ENABLED(CONFIG_HAVE_ACPI_RESUME)
void *wake_vector;
wake_vector = acpi_find_wakeup_vector();
@ -199,7 +199,7 @@ static boot_state_t bs_os_resume_check(void *arg)
static boot_state_t bs_os_resume(void *wake_vector)
{
#if CONFIG_HAVE_ACPI_RESUME
#if IS_ENABLED(CONFIG_HAVE_ACPI_RESUME)
arch_bootstate_coreboot_exit();
acpi_resume(wake_vector);
#endif
@ -239,7 +239,7 @@ static boot_state_t bs_payload_boot(void *arg)
return BS_PAYLOAD_BOOT;
}
#if CONFIG_HAVE_MONOTONIC_TIMER
#if IS_ENABLED(CONFIG_HAVE_MONOTONIC_TIMER)
static void bs_sample_time(struct boot_state *state)
{
struct mono_time *mt;
@ -268,7 +268,7 @@ static inline void bs_sample_time(struct boot_state *state) {}
static inline void bs_report_time(struct boot_state *state) {}
#endif
#if CONFIG_TIMER_QUEUE
#if IS_ENABLED(CONFIG_TIMER_QUEUE)
static void bs_run_timers(int drain)
{
/* Drain all timer callbacks until none are left, if directed.
@ -473,7 +473,7 @@ void main(void)
post_code(POST_ENTRY_RAMSTAGE);
/* Handoff sleep type from romstage. */
#if CONFIG_HAVE_ACPI_RESUME
#if IS_ENABLED(CONFIG_HAVE_ACPI_RESUME)
acpi_is_wakeup();
#endif