diff options
Diffstat (limited to 'drivers/mmc/host/omap.c')
-rw-r--r-- | drivers/mmc/host/omap.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index 552196c764d4..3e8dcf8d2e05 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c | |||
@@ -1300,7 +1300,7 @@ static const struct mmc_host_ops mmc_omap_ops = { | |||
1300 | .set_ios = mmc_omap_set_ios, | 1300 | .set_ios = mmc_omap_set_ios, |
1301 | }; | 1301 | }; |
1302 | 1302 | ||
1303 | static int __init mmc_omap_new_slot(struct mmc_omap_host *host, int id) | 1303 | static int __devinit mmc_omap_new_slot(struct mmc_omap_host *host, int id) |
1304 | { | 1304 | { |
1305 | struct mmc_omap_slot *slot = NULL; | 1305 | struct mmc_omap_slot *slot = NULL; |
1306 | struct mmc_host *mmc; | 1306 | struct mmc_host *mmc; |
@@ -1485,24 +1485,26 @@ static int __devinit mmc_omap_probe(struct platform_device *pdev) | |||
1485 | } | 1485 | } |
1486 | 1486 | ||
1487 | host->nr_slots = pdata->nr_slots; | 1487 | host->nr_slots = pdata->nr_slots; |
1488 | host->reg_shift = (cpu_is_omap7xx() ? 1 : 2); | ||
1489 | |||
1490 | host->mmc_omap_wq = alloc_workqueue("mmc_omap", 0, 0); | ||
1491 | if (!host->mmc_omap_wq) | ||
1492 | goto err_plat_cleanup; | ||
1493 | |||
1488 | for (i = 0; i < pdata->nr_slots; i++) { | 1494 | for (i = 0; i < pdata->nr_slots; i++) { |
1489 | ret = mmc_omap_new_slot(host, i); | 1495 | ret = mmc_omap_new_slot(host, i); |
1490 | if (ret < 0) { | 1496 | if (ret < 0) { |
1491 | while (--i >= 0) | 1497 | while (--i >= 0) |
1492 | mmc_omap_remove_slot(host->slots[i]); | 1498 | mmc_omap_remove_slot(host->slots[i]); |
1493 | 1499 | ||
1494 | goto err_plat_cleanup; | 1500 | goto err_destroy_wq; |
1495 | } | 1501 | } |
1496 | } | 1502 | } |
1497 | 1503 | ||
1498 | host->reg_shift = (cpu_is_omap7xx() ? 1 : 2); | ||
1499 | |||
1500 | host->mmc_omap_wq = alloc_workqueue("mmc_omap", 0, 0); | ||
1501 | if (!host->mmc_omap_wq) | ||
1502 | goto err_plat_cleanup; | ||
1503 | |||
1504 | return 0; | 1504 | return 0; |
1505 | 1505 | ||
1506 | err_destroy_wq: | ||
1507 | destroy_workqueue(host->mmc_omap_wq); | ||
1506 | err_plat_cleanup: | 1508 | err_plat_cleanup: |
1507 | if (pdata->cleanup) | 1509 | if (pdata->cleanup) |
1508 | pdata->cleanup(&pdev->dev); | 1510 | pdata->cleanup(&pdev->dev); |