From: Mayuresh Chitale Date: Thu, 16 Nov 2023 17:16:12 +0000 (+0530) Subject: fs: Fix SPL build if FS_LOADER is enabled X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=cd57cf9ac41a5ec25a0852f91f118dedfc6f7ce6;p=u-boot.git fs: Fix SPL build if FS_LOADER is enabled If FS_LOADER is enabled for the SPL then the build fails with the error: fs/fs.o:(.data.rel.fstypes+0x128): undefined reference to `smh_fs_set_blk_dev' fs/fs.o:(.data.rel.fstypes+0x140): undefined reference to `smh_fs_size' fs/fs.o:(.data.rel.fstypes+0x148): undefined reference to `smh_fs_read' fs/fs.o:(.data.rel.fstypes+0x150): undefined reference to `smh_fs_write' Fix the error by populating the semihosting entry in the fs_types array only for non-SPL builds. Signed-off-by: Mayuresh Chitale Reviewed-by: Tom Rini Reviewed-by: Sean Anderson --- diff --git a/fs/fs.c b/fs/fs.c index f33b85f92b..f1a0b70d1d 100644 --- a/fs/fs.c +++ b/fs/fs.c @@ -256,7 +256,7 @@ static struct fstype_info fstypes[] = { .ln = fs_ln_unsupported, }, #endif -#ifdef CONFIG_SEMIHOSTING +#if CONFIG_IS_ENABLED(SEMIHOSTING) { .fstype = FS_TYPE_SEMIHOSTING, .name = "semihosting",