diff options
Diffstat (limited to 'drivers/mmc/host/tmio_mmc.c')
-rw-r--r-- | drivers/mmc/host/tmio_mmc.c | 15 |
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 | ||
109 | host_remove: | 114 | host_remove: |
110 | tmio_mmc_host_remove(host); | 115 | tmio_mmc_host_remove(host); |
116 | host_free: | ||
117 | tmio_mmc_host_free(host); | ||
111 | cell_disable: | 118 | cell_disable: |
112 | if (cell->disable) | 119 | if (cell->disable) |
113 | cell->disable(pdev); | 120 | cell->disable(pdev); |