diff options
author | Colin Cross <ccross@android.com> | 2011-12-02 14:01:37 +0800 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2012-02-14 14:29:43 -0800 |
commit | 83ff75e613965a5b06a3e00875803fe25635dcde (patch) | |
tree | c74cc57e87a3739c3a4d24da722830995698f6f5 /include | |
parent | 3ae6fb2b8d2fa3577138a99aa27f80f3eefde79b (diff) |
mmc: core: host: only use wakelock for detect work
There is no need to take a wakelock for delayed lazy disable
work, it will be cancelled in the suspend handler and force
disabled. Only take the wakelock when the detect work is
queued, and make sure to drop the wakelock if the work is
cancelled.
Change-Id: I1e507a5f98848954ea21d45e23b6192c3132a349
Signed-off-by: Colin Cross <ccross@android.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mmc/host.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 65d55cbfda5..91ab0519571 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -13,6 +13,7 @@ #include <linux/leds.h> #include <linux/sched.h> #include <linux/fault-inject.h> +#include <linux/wakelock.h> #include <linux/mmc/core.h> #include <linux/mmc/pm.h> @@ -316,6 +317,7 @@ struct mmc_host { struct delayed_work detect; int detect_change; /* card detect flag */ struct mmc_hotplug hotplug; + struct wake_lock detect_wake_lock; const struct mmc_bus_ops *bus_ops; /* current bus driver */ unsigned int bus_refs; /* reference counter */ |