aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds2023-07-07 15:59:33 -0700
committerLinus Torvalds2023-07-07 15:59:33 -0700
commit8689f4f2ea561dd080118eeb05c0255ac9542905 (patch)
treece3c2d7755c3b36838a44018447fee34be139e07 /drivers
parent4c8ab068bea2ed7b5b192cd66d436620a0b4f05e (diff)
parentfa700d73494abbd343c47c6f54837c9874c61bbe (diff)
Merge tag 'mmc-v6.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc
Pull mmc fix from Ulf Hansson: - Fix regression of detection of eMMC/SD/SDIO cards * tag 'mmc-v6.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: Revert "mmc: core: Allow mmc_start_host() synchronously detect a card"
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/core/core.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index ec4108a3e5b9..3d3e0ca52614 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -2199,8 +2199,10 @@ int mmc_card_alternative_gpt_sector(struct mmc_card *card, sector_t *gpt_sector)
}
EXPORT_SYMBOL(mmc_card_alternative_gpt_sector);
-static void __mmc_rescan(struct mmc_host *host)
+void mmc_rescan(struct work_struct *work)
{
+ struct mmc_host *host =
+ container_of(work, struct mmc_host, detect.work);
int i;
if (host->rescan_disable)
@@ -2272,14 +2274,6 @@ static void __mmc_rescan(struct mmc_host *host)
mmc_schedule_delayed_work(&host->detect, HZ);
}
-void mmc_rescan(struct work_struct *work)
-{
- struct mmc_host *host =
- container_of(work, struct mmc_host, detect.work);
-
- __mmc_rescan(host);
-}
-
void mmc_start_host(struct mmc_host *host)
{
host->f_init = max(min(freqs[0], host->f_max), host->f_min);
@@ -2292,8 +2286,7 @@ void mmc_start_host(struct mmc_host *host)
}
mmc_gpiod_request_cd_irq(host);
- host->detect_change = 1;
- __mmc_rescan(host);
+ _mmc_detect_change(host, 0, false);
}
void __mmc_stop_host(struct mmc_host *host)