Commit 95058fbb97b8846e5fa569d5083a76567f2b9d81

Authored by Heinrich Schuchardt
Committed by Tom Rini
1 parent 7bcdf19572

env: mmc/fat/ext4: undefined reference to `mmc_initialize'

For CONFIG_ENV_FAT_INTERFACE != 'mmc' a link error
env/fat.c:93: undefined reference to `mmc_initialize'
occurs if CONFIG_MMC_SUPPORT is not enabled.

Fixes: 26862b4a40c3 ("env: mmc/fat/ext4: make sure that the MMC sub-system
is initialized before using it")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

Showing 2 changed files with 4 additions and 0 deletions Side-by-side Diff

... ... @@ -87,8 +87,10 @@
87 87 int err;
88 88 loff_t off;
89 89  
  90 +#ifdef CONFIG_MMC
90 91 if (!strcmp(CONFIG_ENV_EXT4_INTERFACE, "mmc"))
91 92 mmc_initialize(NULL);
  93 +#endif
92 94  
93 95 part = blk_get_device_part_str(CONFIG_ENV_EXT4_INTERFACE,
94 96 CONFIG_ENV_EXT4_DEVICE_AND_PART,
... ... @@ -89,8 +89,10 @@
89 89 int dev, part;
90 90 int err;
91 91  
  92 +#ifdef CONFIG_MMC
92 93 if (!strcmp(CONFIG_ENV_FAT_INTERFACE, "mmc"))
93 94 mmc_initialize(NULL);
  95 +#endif
94 96  
95 97 part = blk_get_device_part_str(CONFIG_ENV_FAT_INTERFACE,
96 98 CONFIG_ENV_FAT_DEVICE_AND_PART,