diff options
-rw-r--r-- | drivers/mmc/core/core.c | 19 | ||||
-rw-r--r-- | drivers/mmc/core/host.c | 5 | ||||
-rw-r--r-- | include/linux/mmc/host.h | 3 |
3 files changed, 1 insertions, 26 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 85514a0bb73..6352e52b0e5 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -23,7 +23,6 @@ #include <linux/log2.h> #include <linux/regulator/consumer.h> #include <linux/pm_runtime.h> -#include <linux/wakelock.h> #include <linux/mmc/card.h> #include <linux/mmc/host.h> @@ -483,8 +482,6 @@ int mmc_host_enable(struct mmc_host *host) if (host->ops->enable) { int err; - wake_lock(&host->wakelock); - host->en_dis_recurs = 1; err = host->ops->enable(host); host->en_dis_recurs = 0; @@ -492,7 +489,6 @@ int mmc_host_enable(struct mmc_host *host) if (err) { pr_debug("%s: enable error %d\n", mmc_hostname(host), err); - wake_unlock(&host->wakelock); return err; } } @@ -520,8 +516,6 @@ static int mmc_host_do_disable(struct mmc_host *host, int lazy) mmc_schedule_delayed_work(&host->disable, delay); } - if (err == 0) - wake_unlock(&host->wakelock); } host->enabled = 0; return 0; @@ -1773,7 +1767,6 @@ void mmc_rescan(struct work_struct *work) struct mmc_host *host = container_of(work, struct mmc_host, detect.work); int i; - bool extend_wakelock = false; if (host->rescan_disable) return; @@ -1788,12 +1781,6 @@ void mmc_rescan(struct work_struct *work) && !(host->caps & MMC_CAP_NONREMOVABLE)) host->bus_ops->detect(host); - /* If the card was removed the bus will be marked - * as dead - extend the wakelock so userspace - * can respond */ - if (host->bus_dead) - extend_wakelock = 1; - /* * Let mmc_bus_put() free the bus/bus_ops if we've found that * the card is no longer present. @@ -1818,18 +1805,14 @@ void mmc_rescan(struct work_struct *work) mmc_claim_host(host); for (i = 0; i < ARRAY_SIZE(freqs); i++) { - if (!mmc_rescan_try_freq(host, max(freqs[i], host->f_min))) { - extend_wakelock = true; + if (!mmc_rescan_try_freq(host, max(freqs[i], host->f_min))) break; - } if (freqs[i] <= host->f_min) break; } mmc_release_host(host); out: - if (extend_wakelock) - wake_lock_timeout(&host->wakelock, HZ / 2); if (host->caps & MMC_CAP_NEEDS_POLL) mmc_schedule_delayed_work(&host->detect, HZ); } diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index 33eee273959..84694a9410d 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c @@ -290,10 +290,6 @@ struct mmc_host *mmc_alloc_host(int extra, struct device *dev) host->pm_notify.notifier_call = mmc_pm_notify; #endif - snprintf(host->wakelock_name, sizeof(host->wakelock_name), - "mmc%d_delay_work", host->index); - wake_lock_init(&host->wakelock, WAKE_LOCK_SUSPEND, host->wakelock_name); - /* * By default, hosts do not support SGIO or large requests. * They have to set these according to their abilities. @@ -384,7 +380,6 @@ EXPORT_SYMBOL(mmc_remove_host); */ void mmc_free_host(struct mmc_host *host) { - wake_lock_destroy(&host->wakelock); spin_lock(&mmc_host_lock); idr_remove(&mmc_host_idr, host->index); spin_unlock(&mmc_host_lock); diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index c8ef754ce21..b5e35d7701a 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -12,7 +12,6 @@ #include <linux/leds.h> #include <linux/sched.h> -#include <linux/wakelock.h> #include <linux/mmc/core.h> #include <linux/mmc/pm.h> @@ -256,8 +255,6 @@ struct mmc_host { /* private data */ spinlock_t lock; /* lock for claim and bus ops */ - struct wake_lock wakelock; /* wake lock for each host */ - char wakelock_name[24]; struct mmc_ios ios; /* current io bus settings */ u32 ocr; /* the current OCR setting */ |