mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 22:21:42 +00:00
mmc: dw_mmc: dw_mci_get_cd check MMC_CAP_NONREMOVABLE
When non-removable is used for emmc, MMC_CAP_NONREMOVABLE should also be checked, otherwise detection fail since present=0 Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
parent
4b24472483
commit
4de3bf66c6
@ -1302,7 +1302,8 @@ static int dw_mci_get_cd(struct mmc_host *mmc)
|
||||
int gpio_cd = mmc_gpio_get_cd(mmc);
|
||||
|
||||
/* Use platform get_cd function, else try onboard card detect */
|
||||
if (brd->quirks & DW_MCI_QUIRK_BROKEN_CARD_DETECTION)
|
||||
if ((brd->quirks & DW_MCI_QUIRK_BROKEN_CARD_DETECTION) ||
|
||||
(mmc->caps & MMC_CAP_NONREMOVABLE))
|
||||
present = 1;
|
||||
else if (!IS_ERR_VALUE(gpio_cd))
|
||||
present = gpio_cd;
|
||||
|
Loading…
Reference in New Issue
Block a user