mmc: dw_mmc: convert card tasklet to workqueue

Convert the card insert/remove tasklet to a workqueue, and call the
setpower platform specific callback without the spinlock held. This
means neither of the setpower or get_cd callbacks are called from atomic
context which allows them to sleep.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Acked-by: Will Newton <will.newton@imgtec.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
This commit is contained in:
James Hogan
2011-06-24 13:55:55 +01:00
committed by Chris Ball
parent 7456caae37
commit 1791b13ea4
2 changed files with 32 additions and 20 deletions

View File

@@ -131,7 +131,7 @@ struct dw_mci {
u32 stop_cmdr;
u32 dir_status;
struct tasklet_struct tasklet;
struct tasklet_struct card_tasklet;
struct work_struct card_work;
unsigned long pending_events;
unsigned long completed_events;
enum dw_mci_state state;