summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorMicky Ching <micky_ching@realsil.com.cn>2014-02-17 08:45:46 (GMT)
committerChris Ball <chris@printf.net>2014-02-22 18:33:38 (GMT)
commit640e09bc45f5d03622da5230d131c0bfd0d2da3f (patch)
treeb5f5d890f57eacb170bfef987978a8c56a6b7d85 /drivers/mmc
parent9107ebbf9652c033eb5dd10a6ea34a132db3cde1 (diff)
downloadlinux-640e09bc45f5d03622da5230d131c0bfd0d2da3f.tar.xz
mmc: rtsx: fix card poweroff bug
If the host driver removed while card in the slot, the host will not power off card power correctly. This bug is produced because host eject flag set before the last mmc_set_ios callback, we should set the eject flag after power off. Signed-off-by: Micky Ching <micky_ching@realsil.com.cn> Signed-off-by: Chris Ball <chris@printf.net>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/rtsx_pci_sdmmc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c
index c46feda..cc80e31 100644
--- a/drivers/mmc/host/rtsx_pci_sdmmc.c
+++ b/drivers/mmc/host/rtsx_pci_sdmmc.c
@@ -1297,7 +1297,6 @@ static int rtsx_pci_sdmmc_drv_remove(struct platform_device *pdev)
pcr->slots[RTSX_SD_CARD].p_dev = NULL;
pcr->slots[RTSX_SD_CARD].card_event = NULL;
mmc = host->mmc;
- host->eject = true;
mutex_lock(&host->host_mutex);
if (host->mrq) {
@@ -1315,6 +1314,8 @@ static int rtsx_pci_sdmmc_drv_remove(struct platform_device *pdev)
mutex_unlock(&host->host_mutex);
mmc_remove_host(mmc);
+ host->eject = true;
+
mmc_free_host(mmc);
dev_dbg(&(pdev->dev),