]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mmc: delayed_work was never cancelled
authorJorg Schummer <ext-jorg.2.schummer@nokia.com>
Thu, 19 Feb 2009 11:17:03 +0000 (13:17 +0200)
committerPierre Ossman <drzeus@drzeus.cx>
Tue, 24 Mar 2009 20:29:58 +0000 (21:29 +0100)
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>
drivers/mmc/core/core.c

index df6ce4a06cf37f42c11935ce7f4e2f5d92409758..b5899e33b68705f2b72c104eaf0b1a8f8ab1be9d 100644 (file)
@@ -815,6 +815,7 @@ void mmc_stop_host(struct mmc_host *host)
        spin_unlock_irqrestore(&host->lock, flags);
 #endif
 
+       cancel_delayed_work(&host->detect);
        mmc_flush_scheduled_work();
 
        mmc_bus_get(host);
@@ -842,6 +843,7 @@ void mmc_stop_host(struct mmc_host *host)
  */
 int mmc_suspend_host(struct mmc_host *host, pm_message_t state)
 {
+       cancel_delayed_work(&host->detect);
        mmc_flush_scheduled_work();
 
        mmc_bus_get(host);