Commit 7de427d0 authored by Jorg Schummer's avatar Jorg Schummer Committed by Pierre Ossman

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: default avatarJorg Schummer <ext-jorg.2.schummer@nokia.com>
Signed-off-by: default avatarPierre Ossman <drzeus@drzeus.cx>
parent 89c8aa20
...@@ -815,6 +815,7 @@ void mmc_stop_host(struct mmc_host *host) ...@@ -815,6 +815,7 @@ void mmc_stop_host(struct mmc_host *host)
spin_unlock_irqrestore(&host->lock, flags); spin_unlock_irqrestore(&host->lock, flags);
#endif #endif
cancel_delayed_work(&host->detect);
mmc_flush_scheduled_work(); mmc_flush_scheduled_work();
mmc_bus_get(host); mmc_bus_get(host);
...@@ -842,6 +843,7 @@ void mmc_stop_host(struct mmc_host *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) int mmc_suspend_host(struct mmc_host *host, pm_message_t state)
{ {
cancel_delayed_work(&host->detect);
mmc_flush_scheduled_work(); mmc_flush_scheduled_work();
mmc_bus_get(host); mmc_bus_get(host);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment