diff options
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/core/core.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 72c7cf4a9f9d..b6c16704aaab 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c | |||
@@ -500,9 +500,10 @@ void __mmc_release_bus(struct mmc_host *host) | |||
500 | void mmc_detect_change(struct mmc_host *host, unsigned long delay) | 500 | void mmc_detect_change(struct mmc_host *host, unsigned long delay) |
501 | { | 501 | { |
502 | #ifdef CONFIG_MMC_DEBUG | 502 | #ifdef CONFIG_MMC_DEBUG |
503 | mmc_claim_host(host); | 503 | unsigned long flags; |
504 | spin_lock_irqsave(host->lock, flags); | ||
504 | BUG_ON(host->removed); | 505 | BUG_ON(host->removed); |
505 | mmc_release_host(host); | 506 | spin_unlock_irqrestore(host->lock, flags); |
506 | #endif | 507 | #endif |
507 | 508 | ||
508 | mmc_schedule_delayed_work(&host->detect, delay); | 509 | mmc_schedule_delayed_work(&host->detect, delay); |
@@ -625,9 +626,10 @@ EXPORT_SYMBOL(mmc_add_host); | |||
625 | void mmc_remove_host(struct mmc_host *host) | 626 | void mmc_remove_host(struct mmc_host *host) |
626 | { | 627 | { |
627 | #ifdef CONFIG_MMC_DEBUG | 628 | #ifdef CONFIG_MMC_DEBUG |
628 | mmc_claim_host(host); | 629 | unsigned long flags; |
630 | spin_lock_irqsave(&host->lock, flags); | ||
629 | host->removed = 1; | 631 | host->removed = 1; |
630 | mmc_release_host(host); | 632 | spin_unlock_irqrestore(&host->lock, flags); |
631 | #endif | 633 | #endif |
632 | 634 | ||
633 | mmc_flush_scheduled_work(); | 635 | mmc_flush_scheduled_work(); |