[U-Boot] env: Properly check for BLK support

Tom Rini trini at konsulko.com
Sat Apr 7 13:26:04 UTC 2018


On Thu, Mar 22, 2018 at 10:53:50PM +0100, Sjoerd Simons wrote:

> Use CONFIG_IS_ENABLED to see if CONFIG_BLK is enabled. Otherwise
> SPL compilation breaks on boards which do have CONFIG_BLK enabled but
> not DM_MMC for the SPL as follows:
> 
> env/mmc.c: In function ‘init_mmc_for_env’:
> env/mmc.c:164:6: warning: implicit declaration of function ‘blk_get_from_parent’; did you mean ‘efi_get_ram_base’? [-Wimplicit-function-declaration]
>   if (blk_get_from_parent(mmc->dev, &dev))
>       ^~~~~~~~~~~~~~~~~~~
>       efi_get_ram_base
> env/mmc.c:164:29: error: ‘struct mmc’ has no member named ‘dev’
>   if (blk_get_from_parent(mmc->dev, &dev))
>                              ^~
> 
> Signed-off-by: Sjoerd Simons <sjoerd.simons at collabora.co.uk>
> Reviewed-by: Simon Glass <sjg at chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180407/c1278da3/attachment.sig>


More information about the U-Boot mailing list