[U-Boot] [PATCH V2] mmc: mmc_legacy: fix the compiler error with disabled CONFIG_DM_MMC_OPS

Simon Glass sjg at chromium.org
Fri Aug 12 19:20:53 CEST 2016


On 11 August 2016 at 20:39, Jaehoon Chung <jh80.chung at samsung.com> wrote:
> To prevent the compiler error, split the checking condition whether
> cfg->ops is NULL or not.
> It's more clearly, because it's not included in mmc_config structure
> when CONFIG_DM_MMC_OPS is disabled.
>
> drivers/mmc/mmc_legacy.c: In function ‘mmc_create’:
> drivers/mmc/mmc_legacy.c:118:31: error: ‘const struct mmc_config’ has no member named ‘ops’
> drivers/mmc/mmc_legacy.c:118:58: error: ‘const struct mmc_config’ has no member named ‘ops’
> make[1]: *** [drivers/mmc/mmc_legacy.o] Error 1
>
> Signed-off-by: Jaehoon Chung <jh80.chung at samsung.com>
> ---
> Changes for V2:
>         - Fixed the wrong condition checking
>
>  drivers/mmc/mmc_legacy.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list