mmc: mxcmmc: fix the default value for available voltages into mxcmci_probe
If available voltages are not given, mmc_regulator_get_supply() function returns 0 and mxcmmc driver doesn't set a value for ocr_avail mask. In accordance with the comment in platform_data/mmc-mxcmmc.h, fix it, assuming MMC_VDD_32_33 | MMC_VDD_33_34 as default value. Signed-off-by: Matteo Facchinetti <matteo.facchinetti@sirius-es.it> Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
Родитель
adfa57033d
Коммит
18a0980635
|
@ -1077,12 +1077,14 @@ static int mxcmci_probe(struct platform_device *pdev)
|
||||||
dat3_card_detect = true;
|
dat3_card_detect = true;
|
||||||
|
|
||||||
ret = mmc_regulator_get_supply(mmc);
|
ret = mmc_regulator_get_supply(mmc);
|
||||||
if (ret) {
|
if (ret == -EPROBE_DEFER)
|
||||||
if (pdata && ret != -EPROBE_DEFER)
|
goto out_free;
|
||||||
mmc->ocr_avail = pdata->ocr_avail ? :
|
|
||||||
MMC_VDD_32_33 | MMC_VDD_33_34;
|
if (!mmc->ocr_avail) {
|
||||||
|
if (pdata && pdata->ocr_avail)
|
||||||
|
mmc->ocr_avail = pdata->ocr_avail;
|
||||||
else
|
else
|
||||||
goto out_free;
|
mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dat3_card_detect)
|
if (dat3_card_detect)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче