mmc: mxs: use devm_platform_ioremap_resource() to simplify code
Subsystems (2)
PATCH 1/1 mmc: mxs: use devm_platform_ioremap_resource() to simplify code
From: Anson Huang <[email protected]>
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 <[email protected]>
--- drivers/mmc/host/mxs-mmc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/mmc/host/mxs-mmc.c +1 -3
@@ -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;
Signature · 1 line
2.7.4
Quoted 8 lines
From: [email protected] <[email protected]>
Sent: Wednesday, July 17, 2019 4:53 PMUse the new helper
devm_platform_ioremap_resource()which wraps theplatform_get_resource()anddevm_ioremap_resource()together, to simplify the code.Signed-off-by Anson Huang <[email protected]>
Reviewed-by Dong Aisheng <[email protected]>
Regards
Aisheng
Quoted 8 lines · On Wed, 17 Jul 2019 at 11:02, <[email protected]> wrote:
From: Anson Huang <[email protected]>
Use the new helper
devm_platform_ioremap_resource()which wraps theplatform_get_resource()anddevm_ioremap_resource()together, to simplify the code.Signed-off-by Anson Huang <[email protected]>
Applied for next, thanks!
Kind regards
Uffe
Quoted 29 lines
--- drivers/mmc/host/mxs-mmc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/mmc/host/mxs-mmc.c +1
-4@@ -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; --2.7.4