From: Zhangfei Gao Date: Thu, 16 Jan 2014 12:48:47 +0000 (+0800) Subject: mmc: dw_mmc: fix dw_mci_get_cd X-Git-Tag: v3.14-rc1~88^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7cf347bd20ec8169add381ad23f9fb25c6c076f0;p=pandora-kernel.git mmc: dw_mmc: fix dw_mci_get_cd bf626e5550f24aec ("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: Zhangfei Gao Reported-by: Kevin Hilman Reviewed-by: Sachin Kamat Tested-by: Sachin Kamat Tested-by: Kevin Hilman Acked-by: Seungwon Jeon Signed-off-by: Chris Ball --- Reading git-diff-tree failed