From 7115007ccf161ac668e91e899c2f55c050bb93da Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Sat, 30 Oct 2021 23:03:48 -0400 Subject: spl: Make use of CONFIG_IS_ENABLED(OS_BOOT) in SPL/TPL common code paths When building a system that has both TPL and SPL_OS_BOOT, code which tests for CONFIG_SPL_OS_BOOT will be built and enabled in TPL, which is not correct. While there is no CONFIG_TPL_OS_BOOT symbol at this time (and likely will not ever be) we can use CONFIG_IS_ENABLED(OS_BOOT) in these common paths to ensure we only compile these parts in the SPL case. Signed-off-by: Tom Rini --- common/spl/spl_spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'common/spl/spl_spi.c') diff --git a/common/spl/spl_spi.c b/common/spl/spl_spi.c index 46ee405..4e20a23 100644 --- a/common/spl/spl_spi.c +++ b/common/spl/spl_spi.c @@ -18,7 +18,7 @@ #include #include -#ifdef CONFIG_SPL_OS_BOOT +#if CONFIG_IS_ENABLED(OS_BOOT) /* * Load the kernel, check for a valid header we can parse, and if found load * the kernel and then device tree. @@ -107,7 +107,7 @@ static int spl_spi_load_image(struct spl_image_info *spl_image, payload_offs); } -#ifdef CONFIG_SPL_OS_BOOT +#if CONFIG_IS_ENABLED(OS_BOOT) if (spl_start_uboot() || spi_load_image_os(spl_image, flash, header)) #endif { -- cgit v1.1