summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorDaniel Willerud <daniel.willerud@stericsson.com>2011-05-12 16:10:38 +0200
committerUlf Hansson <ulf.hansson@stericsson.com>2011-09-19 16:07:31 +0200
commitc8ef70e3a47798871a4612c0e394702c3312cc66 (patch)
tree6193dfb590886ed1de5021b04d3453dbbccf39f8 /drivers/mmc
parent358e88553925f93389afbcc6dc4257bad1c7740e (diff)
mmc: remove wakelocks
Wakelocks are not needed when enable/disable is utilized in the driver. The disable time-out will prevent the mmc host from suspending until time t has elapsed. ST-Ericsson Linux next: NA ST-Ericsson ID: 337218 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: I018926ed46e05d5aeef1f5a697fe46ae3489d086 Signed-off-by: Daniel Willerud <daniel.willerud@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/23220 Reviewed-by: QATOOLS Reviewed-by: QATEST Reviewed-by: Joakim AXELSSON <joakim.axelsson@stericsson.com> Reviewed-by: Ulf HANSSON <ulf.hansson@stericsson.com> Reviewed-by: Sebastian RASMUSSEN <sebastian.rasmussen@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/30727 Tested-by: Ulf HANSSON <ulf.hansson@stericsson.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/core/core.c19
-rw-r--r--drivers/mmc/core/host.c5
2 files changed, 1 insertions, 23 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);