diff options
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/mmc.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 9ffeeb2cba45..0242c6a21daf 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c | |||
@@ -1550,6 +1550,12 @@ static void mmc_setup(struct mmc_host *host) | |||
1550 | */ | 1550 | */ |
1551 | void mmc_detect_change(struct mmc_host *host, unsigned long delay) | 1551 | void mmc_detect_change(struct mmc_host *host, unsigned long delay) |
1552 | { | 1552 | { |
1553 | #ifdef CONFIG_MMC_DEBUG | ||
1554 | mmc_claim_host(host); | ||
1555 | BUG_ON(host->removed); | ||
1556 | mmc_release_host(host); | ||
1557 | #endif | ||
1558 | |||
1553 | mmc_schedule_delayed_work(&host->detect, delay); | 1559 | mmc_schedule_delayed_work(&host->detect, delay); |
1554 | } | 1560 | } |
1555 | 1561 | ||
@@ -1690,6 +1696,14 @@ void mmc_remove_host(struct mmc_host *host) | |||
1690 | { | 1696 | { |
1691 | struct list_head *l, *n; | 1697 | struct list_head *l, *n; |
1692 | 1698 | ||
1699 | #ifdef CONFIG_MMC_DEBUG | ||
1700 | mmc_claim_host(host); | ||
1701 | host->removed = 1; | ||
1702 | mmc_release_host(host); | ||
1703 | #endif | ||
1704 | |||
1705 | mmc_flush_scheduled_work(); | ||
1706 | |||
1693 | list_for_each_safe(l, n, &host->cards) { | 1707 | list_for_each_safe(l, n, &host->cards) { |
1694 | struct mmc_card *card = mmc_list_to_card(l); | 1708 | struct mmc_card *card = mmc_list_to_card(l); |
1695 | 1709 | ||
@@ -1710,7 +1724,6 @@ EXPORT_SYMBOL(mmc_remove_host); | |||
1710 | */ | 1724 | */ |
1711 | void mmc_free_host(struct mmc_host *host) | 1725 | void mmc_free_host(struct mmc_host *host) |
1712 | { | 1726 | { |
1713 | mmc_flush_scheduled_work(); | ||
1714 | mmc_free_host_sysfs(host); | 1727 | mmc_free_host_sysfs(host); |
1715 | } | 1728 | } |
1716 | 1729 | ||