summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2011-09-07 17:28:58 -0700
committerColin Cross <ccross@android.com>2012-02-14 11:26:24 -0800
commit3663054dcf6f6bed472d4f7fb05d1d3588d9638f (patch)
treebab6683eb635dbc626648dd228c99fe31d94cbd2 /include
parentf20721ec028a606fd27cbe8fe10ab7cfa5549109 (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.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 8c5e545d7bf..99ec9f100e7 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>
@@ -314,6 +315,7 @@ struct mmc_host {
int claim_cnt; /* "claim" nesting count */
struct delayed_work detect;
+ struct wake_lock detect_wake_lock;
int detect_change; /* card detect flag */
struct mmc_hotplug hotplug;