summaryrefslogtreecommitdiff
path: root/include/linux/mmc
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2011-09-07 17:28:58 -0700
committerColin Cross <ccross@android.com>2012-04-09 13:57:45 -0700
commit26d2321b3fdcca2c1b7b062ad4a726ca961416d5 (patch)
treeec1709b1e261c8f3242a7b1278a129e5c64309ee /include/linux/mmc
parentaa3b5f775c46006334bbef15e9fafdec51938ced (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/linux/mmc')
-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 b1f116f6fb8..a1f7a4f6a2c 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -14,6 +14,7 @@
#include <linux/sched.h>
#include <linux/device.h>
#include <linux/fault-inject.h>
+#include <linux/wakelock.h>
#include <linux/mmc/core.h>
#include <linux/mmc/pm.h>
@@ -289,6 +290,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;