mmc: owl-mmc: Use devm_platform_get_and_ioremap_resource()
Subsystems (2)
PATCH 1/1 mmc: owl-mmc: Use devm_platform_get_and_ioremap_resource()
According to commit 890cc39a8799 ("drivers: provide devm_platform_get_and_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does.
--- drivers/mmc/host/owl-mmc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/mmc/host/owl-mmc.c +1 -2
@@ -578,8 +578,7 @@ static int owl_mmc_probe(struct platform_device *pdev) owl_host->mmc = mmc;spin_lock_init (&owl_host->lock); - res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); - owl_host->base =devm_ioremap_resource (&pdev->dev, res); + owl_host->base =devm_platform_get_and_ioremap_resource (pdev,0 , &res);if (IS_ERR (owl_host->base)) { ret =PTR_ERR (owl_host->base); goto err_free_host;
Signature · 1 line
2.20.1.7.g153144c
Manivannan Sadhasivam
maintainerQuoted 16 lines · Yang Li
According to commit
890cc39a8799("drivers: providedevm_platform_get_and_ioremap_resource()"), convertplatform_get_resource(),devm_ioremap_resource()to a single call todevm_platform_get_and_ioremap_resource(), as this is exactly what this function does.Signed-off-by Yang Li <[email protected]>--- drivers/mmc/host/owl-mmc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/mmc/host/owl-mmc.c +0
-0
drivers/mmc/host/owl-mmc.c static int owl_mmc_probe(struct platform_device *pdev) · line 581
Quoted 4 lines
drivers/mmc/host/owl-mmc.c +0
-1@@ -578,8 +578,7 @@ static int owl_mmc_probe(struct platform_device *pdev) owl_host->mmc = mmc;spin_lock_init (&owl_host->lock); - res =platform_get_resource (pdev,IORESOURCE_MEM ,0 );
You forgot to remove the local variable which is now unused.
Thanks,
Mani
Quoted 8 lines
drivers/mmc/host/owl-mmc.c +1
-1- owl_host->base =devm_ioremap_resource (&pdev->dev, res); + owl_host->base =devm_platform_get_and_ioremap_resource (pdev,0 , &res);if (IS_ERR (owl_host->base)) { ret =PTR_ERR (owl_host->base); goto err_free_host;Signature · 1 line
2.20.1.7.g153144c
Signature · 6 lines
மணிவண்ணன் சதாசிவம் _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 20 lines · Manivannan Sadhasivam
Quoted 19 lines · Yang Li
According to commit
890cc39a8799("drivers: providedevm_platform_get_and_ioremap_resource()"), convertplatform_get_resource(),devm_ioremap_resource()to a single call todevm_platform_get_and_ioremap_resource(), as this is exactly what this function does.Signed-off-by Yang Li <[email protected]>--- drivers/mmc/host/owl-mmc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/mmc/host/owl-mmc.c +0
-0@@ -578,8 +578,7 @@ static int owl_mmc_probe(struct platform_device *pdev) owl_host->mmc = mmc;spin_lock_init (&owl_host->lock);
Quoted 4 lines
drivers/mmc/host/owl-mmc.c static int owl_mmc_probe(struct platform_device *pdev) · line 581
Quoted 1 line
drivers/mmc/host/owl-mmc.c +0
-1- res =platform_get_resource (pdev,IORESOURCE_MEM ,0 );You forgot to remove the local variable which is now unused.
Oops, no my bad. It is being used...
Thanks,
Mani
Quoted 14 lines
Thanks,
ManiQuoted 8 lines
drivers/mmc/host/owl-mmc.c +1
-1- owl_host->base =devm_ioremap_resource (&pdev->dev, res); + owl_host->base =devm_platform_get_and_ioremap_resource (pdev,0 , &res);if (IS_ERR (owl_host->base)) { ret =PTR_ERR (owl_host->base); goto err_free_host;Signature · 1 line
2.20.1.7.g153144cSignature · 1 line
மணிவண்ணன் சதாசிவம்
Signature · 1 line
மணிவண்ணன் சதாசிவம்
Quoted 8 lines · Yang Li
According to commit
890cc39a8799("drivers: providedevm_platform_get_and_ioremap_resource()"), convertplatform_get_resource(),devm_ioremap_resource()to a single call todevm_platform_get_and_ioremap_resource(), as this is exactly what this function does.Signed-off-by Yang Li <[email protected]>
Applied for next, thanks!
Kind regards
Uffe
Quoted 21 lines
--- drivers/mmc/host/owl-mmc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/mmc/host/owl-mmc.c +1
-3@@ -578,8 +578,7 @@ static int owl_mmc_probe(struct platform_device *pdev) owl_host->mmc = mmc;spin_lock_init (&owl_host->lock); - res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); - owl_host->base =devm_ioremap_resource (&pdev->dev, res); + owl_host->base =devm_platform_get_and_ioremap_resource (pdev,0 , &res);if (IS_ERR (owl_host->base)) { ret =PTR_ERR (owl_host->base); goto err_free_host; --2.20.1.7.g153144c