summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohan T <mohant@nvidia.com>2013-12-18 11:58:45 +0530
committerSimone Willett <swillett@nvidia.com>2014-02-06 15:55:42 -0800
commit428976d28daa3c72a0d15472d9183fd178f57d1a (patch)
tree00f7d8a97a094948d38060a26d2903222cc06e77
parent90354b3a92437a52d8c6d88efe328dc3029e982c (diff)
mmc: tegra: Stop rescan task initiation on detect stop notify
It seems we are starting mmc_rescan task for card removal case status notify call. So check the card_present input value and start the mmc_rescan task for card present case and stop mmc_rescan task for card not present case. Bug 1405624 Bug 1419961 Change-Id: I888d6317bfba2716b3776e584f4ecfee8d4a91d0 Signed-off-by: Mohan T <mohant@nvidia.com> Reviewed-on: http://git-master/r/346873 (cherry picked from commit 9c33ba5b60432cbb88deeb3a4ee81edf01d32f67) Reviewed-on: http://git-master/r/364068 Reviewed-by: Narayan Reddy <narayanr@nvidia.com> Tested-by: Narayan Reddy <narayanr@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Steve Lin <stlin@nvidia.com>
-rw-r--r--drivers/mmc/host/sdhci-tegra.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
index e27ac92dc5b5..0fd3f3317488 100644
--- a/drivers/mmc/host/sdhci-tegra.c
+++ b/drivers/mmc/host/sdhci-tegra.c
@@ -553,7 +553,13 @@ static void sdhci_status_notify_cb(int card_present, void *dev_id)
plat = pdev->dev.platform_data;
if (!plat->mmc_data.status) {
- mmc_detect_change(sdhci->mmc, 0);
+ if (card_present == 1) {
+ sdhci->mmc->rescan_disable = 0;
+ mmc_detect_change(sdhci->mmc, 0);
+ } else if (card_present == 0) {
+ sdhci->mmc->detect_change = 0;
+ sdhci->mmc->rescan_disable = 1;
+ }
return;
}