aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/mmc_spi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/host/mmc_spi.c')
-rw-r--r--drivers/mmc/host/mmc_spi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c
index ad00e1632317..87e211df68ac 100644
--- a/drivers/mmc/host/mmc_spi.c
+++ b/drivers/mmc/host/mmc_spi.c
@@ -1285,7 +1285,7 @@ static int mmc_spi_probe(struct spi_device *spi)
1285 /* Platform data is used to hook up things like card sensing 1285 /* Platform data is used to hook up things like card sensing
1286 * and power switching gpios. 1286 * and power switching gpios.
1287 */ 1287 */
1288 host->pdata = spi->dev.platform_data; 1288 host->pdata = mmc_spi_get_pdata(spi);
1289 if (host->pdata) 1289 if (host->pdata)
1290 mmc->ocr_avail = host->pdata->ocr_mask; 1290 mmc->ocr_avail = host->pdata->ocr_mask;
1291 if (!mmc->ocr_avail) { 1291 if (!mmc->ocr_avail) {
@@ -1368,6 +1368,7 @@ fail_glue_init:
1368 1368
1369fail_nobuf1: 1369fail_nobuf1:
1370 mmc_free_host(mmc); 1370 mmc_free_host(mmc);
1371 mmc_spi_put_pdata(spi);
1371 dev_set_drvdata(&spi->dev, NULL); 1372 dev_set_drvdata(&spi->dev, NULL);
1372 1373
1373nomem: 1374nomem:
@@ -1402,6 +1403,7 @@ static int __devexit mmc_spi_remove(struct spi_device *spi)
1402 1403
1403 spi->max_speed_hz = mmc->f_max; 1404 spi->max_speed_hz = mmc->f_max;
1404 mmc_free_host(mmc); 1405 mmc_free_host(mmc);
1406 mmc_spi_put_pdata(spi);
1405 dev_set_drvdata(&spi->dev, NULL); 1407 dev_set_drvdata(&spi->dev, NULL);
1406 } 1408 }
1407 return 0; 1409 return 0;