aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorJorg Schummer <ext-jorg.2.schummer@nokia.com>2009-02-19 06:17:03 -0500
committerPierre Ossman <drzeus@drzeus.cx>2009-03-24 16:29:58 -0400
commit7de427d088a967d2173739e21e744921d5496a8b (patch)
tree6b4476bdcd796dc5cf66f21a9f00fc22b329becb /drivers/mmc
parent89c8aa203e71f05afdc978700cbc767d310e3d70 (diff)
mmc: delayed_work was never cancelled
The delayed work item mmc_host.detect is now cancelled before flushing the work queue. This takes care of cases when delayed_work was scheduled for mmc_host.detect, but not yet placed in the work queue. Signed-off-by: Jorg Schummer <ext-jorg.2.schummer@nokia.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/core/core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index df6ce4a06cf3..b5899e33b687 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -815,6 +815,7 @@ void mmc_stop_host(struct mmc_host *host)
815 spin_unlock_irqrestore(&host->lock, flags); 815 spin_unlock_irqrestore(&host->lock, flags);
816#endif 816#endif
817 817
818 cancel_delayed_work(&host->detect);
818 mmc_flush_scheduled_work(); 819 mmc_flush_scheduled_work();
819 820
820 mmc_bus_get(host); 821 mmc_bus_get(host);
@@ -842,6 +843,7 @@ void mmc_stop_host(struct mmc_host *host)
842 */ 843 */
843int mmc_suspend_host(struct mmc_host *host, pm_message_t state) 844int mmc_suspend_host(struct mmc_host *host, pm_message_t state)
844{ 845{
846 cancel_delayed_work(&host->detect);
845 mmc_flush_scheduled_work(); 847 mmc_flush_scheduled_work();
846 848
847 mmc_bus_get(host); 849 mmc_bus_get(host);