aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/core/core.c2
-rw-r--r--drivers/mmc/core/host.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 8d00aef9523e..9503cabc96f1 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -2107,6 +2107,7 @@ void mmc_rescan(struct work_struct *work)
2107void mmc_start_host(struct mmc_host *host) 2107void mmc_start_host(struct mmc_host *host)
2108{ 2108{
2109 host->f_init = max(freqs[0], host->f_min); 2109 host->f_init = max(freqs[0], host->f_min);
2110 host->rescan_disable = 0;
2110 mmc_power_up(host); 2111 mmc_power_up(host);
2111 mmc_detect_change(host, 0); 2112 mmc_detect_change(host, 0);
2112} 2113}
@@ -2120,6 +2121,7 @@ void mmc_stop_host(struct mmc_host *host)
2120 spin_unlock_irqrestore(&host->lock, flags); 2121 spin_unlock_irqrestore(&host->lock, flags);
2121#endif 2122#endif
2122 2123
2124 host->rescan_disable = 1;
2123 cancel_delayed_work_sync(&host->detect); 2125 cancel_delayed_work_sync(&host->detect);
2124 mmc_flush_scheduled_work(); 2126 mmc_flush_scheduled_work();
2125 2127
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
index 74cf29a504f4..597f189b4427 100644
--- a/drivers/mmc/core/host.c
+++ b/drivers/mmc/core/host.c
@@ -313,6 +313,8 @@ struct mmc_host *mmc_alloc_host(int extra, struct device *dev)
313 if (!host) 313 if (!host)
314 return NULL; 314 return NULL;
315 315
316 /* scanning will be enabled when we're ready */
317 host->rescan_disable = 1;
316 spin_lock(&mmc_host_lock); 318 spin_lock(&mmc_host_lock);
317 err = idr_get_new(&mmc_host_idr, host, &host->index); 319 err = idr_get_new(&mmc_host_idr, host, &host->index);
318 spin_unlock(&mmc_host_lock); 320 spin_unlock(&mmc_host_lock);