summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnson Huang <Anson.Huang@nxp.com>2019-07-17 10:52:59 +0200
committerUlf Hansson <ulf.hansson@linaro.org>2019-09-11 15:58:39 +0200
commit59532dbb4983388a803a9313fca21633ac589078 (patch)
tree917c48e4412d75d305d26479649f3480ee073905
parentmmc: usdhi6rol0: Add maintainers (diff)
downloadlinux-59532dbb4983388a803a9313fca21633ac589078.tar.xz
linux-59532dbb4983388a803a9313fca21633ac589078.zip
mmc: mxs: use devm_platform_ioremap_resource() to simplify code
Use the new helper devm_platform_ioremap_resource() which wraps the platform_get_resource() and devm_ioremap_resource() together, to simplify the code. Signed-off-by: Anson Huang <Anson.Huang@nxp.com> Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r--drivers/mmc/host/mxs-mmc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
index b334e81c5cab..78e7e350655c 100644
--- a/drivers/mmc/host/mxs-mmc.c
+++ b/drivers/mmc/host/mxs-mmc.c
@@ -571,7 +571,6 @@ static int mxs_mmc_probe(struct platform_device *pdev)
struct device_node *np = pdev->dev.of_node;
struct mxs_mmc_host *host;
struct mmc_host *mmc;
- struct resource *iores;
int ret = 0, irq_err;
struct regulator *reg_vmmc;
struct mxs_ssp *ssp;
@@ -587,8 +586,7 @@ static int mxs_mmc_probe(struct platform_device *pdev)
host = mmc_priv(mmc);
ssp = &host->ssp;
ssp->dev = &pdev->dev;
- iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- ssp->base = devm_ioremap_resource(&pdev->dev, iores);
+ ssp->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(ssp->base)) {
ret = PTR_ERR(ssp->base);
goto out_mmc_free;