diff options
Diffstat (limited to 'drivers/mmc/mmc.c')
-rw-r--r-- | drivers/mmc/mmc.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 9d190022a490..6f2a282e2b97 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c | |||
@@ -1419,18 +1419,16 @@ static void mmc_setup(struct mmc_host *host) | |||
1419 | */ | 1419 | */ |
1420 | void mmc_detect_change(struct mmc_host *host, unsigned long delay) | 1420 | void mmc_detect_change(struct mmc_host *host, unsigned long delay) |
1421 | { | 1421 | { |
1422 | if (delay) | 1422 | mmc_schedule_delayed_work(&host->detect, delay); |
1423 | mmc_schedule_delayed_work(&host->detect, delay); | ||
1424 | else | ||
1425 | mmc_schedule_work(&host->detect); | ||
1426 | } | 1423 | } |
1427 | 1424 | ||
1428 | EXPORT_SYMBOL(mmc_detect_change); | 1425 | EXPORT_SYMBOL(mmc_detect_change); |
1429 | 1426 | ||
1430 | 1427 | ||
1431 | static void mmc_rescan(void *data) | 1428 | static void mmc_rescan(struct work_struct *work) |
1432 | { | 1429 | { |
1433 | struct mmc_host *host = data; | 1430 | struct mmc_host *host = |
1431 | container_of(work, struct mmc_host, detect.work); | ||
1434 | struct list_head *l, *n; | 1432 | struct list_head *l, *n; |
1435 | unsigned char power_mode; | 1433 | unsigned char power_mode; |
1436 | 1434 | ||
@@ -1513,7 +1511,7 @@ struct mmc_host *mmc_alloc_host(int extra, struct device *dev) | |||
1513 | spin_lock_init(&host->lock); | 1511 | spin_lock_init(&host->lock); |
1514 | init_waitqueue_head(&host->wq); | 1512 | init_waitqueue_head(&host->wq); |
1515 | INIT_LIST_HEAD(&host->cards); | 1513 | INIT_LIST_HEAD(&host->cards); |
1516 | INIT_WORK(&host->detect, mmc_rescan, host); | 1514 | INIT_DELAYED_WORK(&host->detect, mmc_rescan); |
1517 | 1515 | ||
1518 | /* | 1516 | /* |
1519 | * By default, hosts do not support SGIO or large requests. | 1517 | * By default, hosts do not support SGIO or large requests. |
@@ -1611,7 +1609,7 @@ EXPORT_SYMBOL(mmc_suspend_host); | |||
1611 | */ | 1609 | */ |
1612 | int mmc_resume_host(struct mmc_host *host) | 1610 | int mmc_resume_host(struct mmc_host *host) |
1613 | { | 1611 | { |
1614 | mmc_rescan(host); | 1612 | mmc_rescan(&host->detect.work); |
1615 | 1613 | ||
1616 | return 0; | 1614 | return 0; |
1617 | } | 1615 | } |