diff options
author | John Stultz <john.stultz@linaro.org> | 2015-12-04 12:13:13 -0800 |
---|---|---|
committer | Amit Pundir <amit.pundir@linaro.org> | 2015-12-14 16:03:57 +0530 |
commit | 01b53e00f372066d3633ea303e5c2a9f09f1348a (patch) | |
tree | 70cb76b8091dc2cb3be9d487baba896f1a9fd20e | |
parent | 9e1d7cd693bbce4ab6616f61025262a96a4e04ed (diff) |
mmc: Extend wakelock if bus is dead
This patch sets extend_wakelock if the host's
bus is marked dead due to card removal.
This change was originally made in bc4dc52f178828
(mmc: mmcblk: Add support for deferred SD bus resume),
which was reverted due to the majority of the patch
no longer building or making sense. However one small
part of that patch ought to be saved.
Change-Id: Idde72f9e313fc52d467ef0aad41cecd2c9f9f212
Signed-off-by: John Stultz <john.stultz@linaro.org>
(cherry picked from commit dde72f9e313fc52d467ef0aad41cecd2c9f9f212)
-rw-r--r-- | drivers/mmc/core/core.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 4b8d694c6949..ee804f03dfa9 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -2457,6 +2457,12 @@ void mmc_rescan(struct work_struct *work) host->detect_change = 0; + /* 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. |