mmc: host: bcm2835: use devm_platform_ioremap_resource wrapper
Subsystems (3)
PATCH 1/1 mmc: host: bcm2835: use devm_platform_ioremap_resource wrapper
Use devm_platform_ioremap_resource helper which wraps platform_get_resource() and devm_ioremap_resource() together.
Generated by: scripts/coccinelle/api/devm_platform_ioremap_resource.cocci.
More information about semantic patching is available at
http://coccinelle.lip6.fr/
Signed-off-by Saiyam Doshi <[email protected]>
--- drivers/mmc/host/bcm2835.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/mmc/host/bcm2835.c +1 -3
@@ -1357,7 +1357,6 @@ static int bcm2835_probe(struct platform_device *pdev) {struct device *dev = &pdev->dev;struct clk *clk; -struct resource *iomem;struct bcm2835_host *host;struct mmc_host *mmc;const __be32 *regaddr_p;
@@ -1373,8 +1372,7 @@ static int bcm2835_probe(struct platform_device *pdev) host->pdev = pdev;spin_lock_init (&host->lock); - iomem =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); - host->ioaddr =devm_ioremap_resource (dev, iomem); + host->ioaddr =devm_platform_ioremap_resource (pdev,0 );if (IS_ERR (host->ioaddr)) { ret =PTR_ERR (host->ioaddr); goto err;
Signature · 1 line
2.20.1
Quoted 10 lines · Saiyam Doshi
Use
devm_platform_ioremap_resourcehelper which wrapsplatform_get_resource()anddevm_ioremap_resource()together.Generated by:
scripts/coccinelle/api/devm_platform_ioremap_resource.cocci.More information about semantic patching is available at
http://coccinelle.lip6.fr/Signed-off-by Saiyam Doshi <[email protected]>
Applied for next, thanks!
Kind regards
Uffe
Quoted 29 lines
--- drivers/mmc/host/bcm2835.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/mmc/host/bcm2835.c +1
-4@@ -1357,7 +1357,6 @@ static int bcm2835_probe(struct platform_device *pdev) {struct device *dev = &pdev->dev;struct clk *clk; -struct resource *iomem;struct bcm2835_host *host;struct mmc_host *mmc;const __be32 *regaddr_p;@@ -1373,8 +1372,7 @@ static int bcm2835_probe(struct platform_device *pdev) host->pdev = pdev;spin_lock_init (&host->lock); - iomem =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); - host->ioaddr =devm_ioremap_resource (dev, iomem); + host->ioaddr =devm_platform_ioremap_resource (pdev,0 );if (IS_ERR (host->ioaddr)) { ret =PTR_ERR (host->ioaddr); goto err; --2.20.1