mmc: core: remove check of host->removed for rescan routine
authorShawn Lin <shawn.lin@rock-chips.com>
Wed, 19 Jul 2017 07:50:56 +0000 (15:50 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 30 Aug 2017 12:01:33 +0000 (14:01 +0200)
The intention of this check was to prevent the conflict between
hotplug and removing driver for whatever reason. Currently it
doesn't improve anything and the following rescan process could
still saftly perform the scan flow. So these code seems pointless
now and let's remove them.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/core.c
include/linux/mmc/host.h

index 26431267a3e2d790d4eae99e65881ca60bd2047d..b311ec974c6ac28526989d0fb412f362a6842576 100644 (file)
@@ -1769,13 +1769,6 @@ void mmc_detach_bus(struct mmc_host *host)
 static void _mmc_detect_change(struct mmc_host *host, unsigned long delay,
                                bool cd_irq)
 {
-#ifdef CONFIG_MMC_DEBUG
-       unsigned long flags;
-       spin_lock_irqsave(&host->lock, flags);
-       WARN_ON(host->removed);
-       spin_unlock_irqrestore(&host->lock, flags);
-#endif
-
        /*
         * If the device is configured as wakeup, we prevent a new sleep for
         * 5 s to give provision for user space to consume the event.
@@ -2646,12 +2639,6 @@ void mmc_start_host(struct mmc_host *host)
 
 void mmc_stop_host(struct mmc_host *host)
 {
-#ifdef CONFIG_MMC_DEBUG
-       unsigned long flags;
-       spin_lock_irqsave(&host->lock, flags);
-       host->removed = 1;
-       spin_unlock_irqrestore(&host->lock, flags);
-#endif
        if (host->slot.cd_irq >= 0) {
                if (host->slot.cd_wake_enabled)
                        disable_irq_wake(host->slot.cd_irq);
index ebd1cebbef0c9a1732e0b36542c3053f7d32c7d5..4617c21f97f7907b9225c91777c9178def25912d 100644 (file)
@@ -328,9 +328,6 @@ struct mmc_host {
        unsigned int            use_spi_crc:1;
        unsigned int            claimed:1;      /* host exclusively claimed */
        unsigned int            bus_dead:1;     /* bus has been released */
-#ifdef CONFIG_MMC_DEBUG
-       unsigned int            removed:1;      /* host is being removed */
-#endif
        unsigned int            can_retune:1;   /* re-tuning can be used */
        unsigned int            doing_retune:1; /* re-tuning in progress */
        unsigned int            retune_now:1;   /* do re-tuning at next req */