aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/tmio_mmc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/host/tmio_mmc.c')
-rw-r--r--drivers/mmc/host/tmio_mmc.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c
index 2ca0afaab792..f746df493892 100644
--- a/drivers/mmc/host/tmio_mmc.c
+++ b/drivers/mmc/host/tmio_mmc.c
@@ -88,14 +88,19 @@ static int tmio_mmc_probe(struct platform_device *pdev)
88 if (!res) 88 if (!res)
89 return -EINVAL; 89 return -EINVAL;
90 90
91 /* SD control register space size is 0x200, 0x400 for bus_shift=1 */
92 pdata->bus_shift = resource_size(res) >> 10;
93 pdata->flags |= TMIO_MMC_HAVE_HIGH_REG; 91 pdata->flags |= TMIO_MMC_HAVE_HIGH_REG;
94 92
95 ret = tmio_mmc_host_probe(&host, pdev, pdata); 93 host = tmio_mmc_host_alloc(pdev);
96 if (ret) 94 if (!host)
97 goto cell_disable; 95 goto cell_disable;
98 96
97 /* SD control register space size is 0x200, 0x400 for bus_shift=1 */
98 host->bus_shift = resource_size(res) >> 10;
99
100 ret = tmio_mmc_host_probe(host, pdata);
101 if (ret)
102 goto host_free;
103
99 ret = request_irq(irq, tmio_mmc_irq, IRQF_TRIGGER_FALLING, 104 ret = request_irq(irq, tmio_mmc_irq, IRQF_TRIGGER_FALLING,
100 dev_name(&pdev->dev), host); 105 dev_name(&pdev->dev), host);
101 if (ret) 106 if (ret)
@@ -108,6 +113,8 @@ static int tmio_mmc_probe(struct platform_device *pdev)
108 113
109host_remove: 114host_remove:
110 tmio_mmc_host_remove(host); 115 tmio_mmc_host_remove(host);
116host_free:
117 tmio_mmc_host_free(host);
111cell_disable: 118cell_disable:
112 if (cell->disable) 119 if (cell->disable)
113 cell->disable(pdev); 120 cell->disable(pdev);