Use CONFIG_IS_ENABLED(OPTEE) instead of IS_ENABLED(CONFIG_OPTEE)
to avoid calling OP-TEE APIs in SPL builds where the driver is
not available, fixing the SPL link error.

Fixes: undefined reference to `is_optee_smc_api' in spl/u-boot-spl

Signed-off-by: Aswin Murugan <[email protected]>
---
 arch/arm/mach-snapdragon/of_fixup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-snapdragon/of_fixup.c 
b/arch/arm/mach-snapdragon/of_fixup.c
index 374e6262db4..2d6446694d6 100644
--- a/arch/arm/mach-snapdragon/of_fixup.c
+++ b/arch/arm/mach-snapdragon/of_fixup.c
@@ -273,7 +273,7 @@ static int qcom_of_fixup_nodes(void * __maybe_unused ctx, 
struct event *event)
 
        time_call(fixup_usb_nodes, root);
 
-       if (IS_ENABLED(CONFIG_OPTEE) && is_optee_smc_api())
+       if (CONFIG_IS_ENABLED(OPTEE) && is_optee_smc_api())
                time_call(add_optee_node, root);
 
        return 0;
-- 
2.34.1

Reply via email to