diff options
author | Simon Glass <sjg@chromium.org> | 2023-09-26 08:14:18 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-10-06 14:38:11 -0400 |
commit | 52779874dac3f096f9f7893f0b3603aeff4c646b (patch) | |
tree | a773075f0f15cdd2c26368b07a7f9f11870aff84 /common | |
parent | 9cbdc3a0fca805bb1fd9ccf85114c504860814b9 (diff) | |
download | u-boot-52779874dac3f096f9f7893f0b3603aeff4c646b.tar.gz u-boot-52779874dac3f096f9f7893f0b3603aeff4c646b.tar.bz2 u-boot-52779874dac3f096f9f7893f0b3603aeff4c646b.zip |
spl: Avoid #ifdef with CONFIG_SPL_SYS_MALLOC
Use IF_ENABLED_INT() to avoid needing to use the preprocessor.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/spl/spl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/common/spl/spl.c b/common/spl/spl.c index 0f45336551..a58b070d17 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -750,10 +750,10 @@ void board_init_r(gd_t *dummy1, ulong dummy2) spl_set_bd(); -#if defined(CONFIG_SPL_SYS_MALLOC) - mem_malloc_init(SPL_SYS_MALLOC_START, CONFIG_SPL_SYS_MALLOC_SIZE); - gd->flags |= GD_FLG_FULL_MALLOC_INIT; -#endif + if (IS_ENABLED(CONFIG_SPL_SYS_MALLOC)) { + mem_malloc_init(SPL_SYS_MALLOC_START, SPL_SYS_MALLOC_SIZE); + gd->flags |= GD_FLG_FULL_MALLOC_INIT; + } if (!(gd->flags & GD_FLG_SPL_INIT)) { if (spl_init()) hang(); |