]> git.dujemihanovic.xyz Git - u-boot.git/commit
mmc: mmc_legacy: fix the compiler error with disabled CONFIG_DM_MMC_OPS
authorJaehoon Chung <jh80.chung@samsung.com>
Fri, 12 Aug 2016 02:39:05 +0000 (11:39 +0900)
committerJaehoon Chung <jh80.chung@samsung.com>
Tue, 16 Aug 2016 01:27:24 +0000 (10:27 +0900)
commit177381a9f9e956353deaa56d86bec47e02995ff3
tree08e8741c9f71591a9c1836ebb4c43fc6fb9df574
parentd188b1130226d304fb3cd2c901b968eca927f39f
mmc: mmc_legacy: fix the compiler error with disabled CONFIG_DM_MMC_OPS

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@samsung.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/mmc/mmc_legacy.c