From e18e2789803316172c4d2a640c747343ade60a6e Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Tue, 20 Sep 2011 19:58:51 -0700 Subject: 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 --- include/linux/mmc/host.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index a19facadb1a..51128f8a577 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -12,6 +12,7 @@ #include #include +#include #include #include @@ -280,6 +281,7 @@ struct mmc_host { int claim_cnt; /* "claim" nesting count */ struct delayed_work detect; + struct wake_lock detect_wake_lock; const struct mmc_bus_ops *bus_ops; /* current bus driver */ unsigned int bus_refs; /* reference counter */ -- cgit v1.2.3