From dd5979ab4330d8677ad250ec4afcd7cb10c83cbc Mon Sep 17 00:00:00 2001 From: Nico Huber Date: Mon, 12 Nov 2012 16:59:24 +0100 Subject: libpayload: Use #ifdef for CONFIG_* checks Libpayload uses the linux kernel's config style, where CONFIG_* defines don't get written for unset tristates. Change-Id: I3f832cf86bca9a1e153d96af4bf6434a19eba2f6 Signed-off-by: Nico Huber Reviewed-on: http://review.coreboot.org/1847 Tested-by: build bot (Jenkins) Reviewed-by: Anton Kochkov Reviewed-by: Stefan Reinauer --- payloads/libpayload/arch/i386/coreboot.c | 4 ++-- payloads/libpayload/arch/i386/main.c | 5 +++-- payloads/libpayload/arch/powerpc/main.c | 5 +++-- 3 files changed, 8 insertions(+), 6 deletions(-) (limited to 'payloads/libpayload/arch') diff --git a/payloads/libpayload/arch/i386/coreboot.c b/payloads/libpayload/arch/i386/coreboot.c index 81d121a96a..5037011efa 100644 --- a/payloads/libpayload/arch/i386/coreboot.c +++ b/payloads/libpayload/arch/i386/coreboot.c @@ -84,7 +84,7 @@ static void cb_parse_version(void *ptr, struct sysinfo_t *info) info->cb_version = (char *)ver->string; } -#if CONFIG_CHROMEOS +#ifdef CONFIG_CHROMEOS static void cb_parse_vbnv(unsigned char *ptr, struct sysinfo_t *info) { struct cb_vbnv *vbnv = (struct cb_vbnv *)ptr; @@ -251,7 +251,7 @@ static int cb_parse_header(void *addr, int len, struct sysinfo_t *info) #endif case CB_TAG_MAINBOARD: info->mainboard = (struct cb_mainboard *)ptr; -#if CONFIG_CHROMEOS +#ifdef CONFIG_CHROMEOS case CB_TAG_GPIO: cb_parse_gpios(ptr, info); break; diff --git a/payloads/libpayload/arch/i386/main.c b/payloads/libpayload/arch/i386/main.c index 19ac6628eb..1bac7a8aaa 100644 --- a/payloads/libpayload/arch/i386/main.c +++ b/payloads/libpayload/arch/i386/main.c @@ -50,8 +50,9 @@ void start_main(void) lib_get_sysinfo(); /* Optionally set up the consoles. */ - if (!CONFIG_SKIP_CONSOLE_INIT) - console_init(); +#ifndef CONFIG_SKIP_CONSOLE_INIT + console_init(); +#endif /* * Any other system init that has to happen before the diff --git a/payloads/libpayload/arch/powerpc/main.c b/payloads/libpayload/arch/powerpc/main.c index 431cac460b..9722e0c0c5 100644 --- a/payloads/libpayload/arch/powerpc/main.c +++ b/payloads/libpayload/arch/powerpc/main.c @@ -47,8 +47,9 @@ void start_main(void) extern int main(int argc, char **argv); /* Optionally set up the consoles. */ - if (!CONFIG_SKIP_CONSOLE_INIT) - console_init(); +#ifndef CONFIG_SKIP_CONSOLE_INIT + console_init(); +#endif /* Gather system information. */ lib_get_sysinfo(); -- cgit v1.2.3