* [PATCH] mmc: host: bcm2835: use devm_platform_ioremap_resource wrapper
@ 2019-09-18 18:02 Saiyam Doshi
2019-10-03 10:01 ` Ulf Hansson
0 siblings, 1 reply; 2+ messages in thread
From: Saiyam Doshi @ 2019-09-18 18:02 UTC (permalink / raw)
To: ulf.hansson, f.fainelli, rjui, sbranden, bcm-kernel-feedback-list
Cc: linux-mmc, linux-kernel
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 <saiyamdoshi.in@gmail.com>
---
drivers/mmc/host/bcm2835.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c
index 148414d7f0c9..99f61fd2a658 100644
--- a/drivers/mmc/host/bcm2835.c
+++ b/drivers/mmc/host/bcm2835.c
@@ -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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mmc: host: bcm2835: use devm_platform_ioremap_resource wrapper
2019-09-18 18:02 [PATCH] mmc: host: bcm2835: use devm_platform_ioremap_resource wrapper Saiyam Doshi
@ 2019-10-03 10:01 ` Ulf Hansson
0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2019-10-03 10:01 UTC (permalink / raw)
To: Saiyam Doshi
Cc: Florian Fainelli, Ray Jui, Scott Branden, BCM Kernel Feedback,
linux-mmc@vger.kernel.org, Linux Kernel Mailing List
On Wed, 18 Sep 2019 at 20:03, Saiyam Doshi <saiyamdoshi.in@gmail.com> wrote:
>
> 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 <saiyamdoshi.in@gmail.com>
Applied for next, thanks!
Kind regards
Uffe
> ---
> drivers/mmc/host/bcm2835.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c
> index 148414d7f0c9..99f61fd2a658 100644
> --- a/drivers/mmc/host/bcm2835.c
> +++ b/drivers/mmc/host/bcm2835.c
> @@ -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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-03 10:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-18 18:02 [PATCH] mmc: host: bcm2835: use devm_platform_ioremap_resource wrapper Saiyam Doshi
2019-10-03 10:01 ` Ulf Hansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox