mmc: dw_mmc: fix dw_mci_get_cd
bf626e55 ("mmc: dw_mmc: use slot-gpio to handle cd pin") caused CDETECT to be ignored, since negated return value of mmc_gpio_get_cd(mmc) can not be checked by IS_ERR_VALUE. Also, add spin_lock_bh(&host->lock) for atomic access to DW_MMC_CARD_PRESENT, otherwise sd detect may occasionally fail. Signed-off-by: NZhangfei Gao <zhangfei.gao@linaro.org> Reported-by: NKevin Hilman <khilman@linaro.org> Reviewed-by: NSachin Kamat <sachin.kamat@linaro.org> Tested-by: NSachin Kamat <sachin.kamat@linaro.org> Tested-by: NKevin Hilman <khilman@linaro.org> Acked-by: NSeungwon Jeon <tgih.jun@samsung.com> Signed-off-by: NChris Ball <chris@printf.net>
Showing
想要评论请 注册 或 登录