summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/mmc_spi.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2021-04-19 14:24:55 +0300
committerUlf Hansson <ulf.hansson@linaro.org>2021-04-23 10:29:49 +0300
commit6dab809bb5b183015e19d558bfa95107de660be0 (patch)
treef93693d6866d448af6b22289f29397dc8082414c /drivers/mmc/host/mmc_spi.c
parent0f2c771e74b56e8c0101cac2b8671bcf6feccd96 (diff)
downloadlinux-6dab809bb5b183015e19d558bfa95107de660be0.tar.xz
mmc: core: Convert mmc_of_parse_voltage() to use device property API
mmc_of_parse() for a few years has been using device property API. Convert mmc_of_parse_voltage() as well. At the same time switch users to new API. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20210419112459.25241-2-andriy.shevchenko@linux.intel.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/mmc_spi.c')
-rw-r--r--drivers/mmc/host/mmc_spi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c
index 02f4fd26e76a..9776a03a10f5 100644
--- a/drivers/mmc/host/mmc_spi.c
+++ b/drivers/mmc/host/mmc_spi.c
@@ -1397,6 +1397,8 @@ static int mmc_spi_probe(struct spi_device *spi)
host->ones = ones;
+ dev_set_drvdata(&spi->dev, mmc);
+
/* Platform data is used to hook up things like card sensing
* and power switching gpios.
*/
@@ -1413,8 +1415,6 @@ static int mmc_spi_probe(struct spi_device *spi)
host->powerup_msecs = 250;
}
- dev_set_drvdata(&spi->dev, mmc);
-
/* preallocate dma buffers */
host->data = kmalloc(sizeof(*host->data), GFP_KERNEL);
if (!host->data)
@@ -1494,8 +1494,8 @@ fail_glue_init:
fail_dma:
kfree(host->data);
fail_nobuf1:
- mmc_free_host(mmc);
mmc_spi_put_pdata(spi);
+ mmc_free_host(mmc);
nomem:
kfree(ones);
return status;
@@ -1518,8 +1518,8 @@ static int mmc_spi_remove(struct spi_device *spi)
kfree(host->ones);
spi->max_speed_hz = mmc->f_max;
- mmc_free_host(mmc);
mmc_spi_put_pdata(spi);
+ mmc_free_host(mmc);
return 0;
}