All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: au1x: psc-i2s: Convert to use devm_ioremap_resource
@ 2015-08-30  3:09 Axel Lin
  2015-08-30  6:22 ` Manuel Lauss
  2015-08-30 11:26 ` Applied "ASoC: au1x: psc-i2s: Convert to use devm_ioremap_resource" to the asoc tree Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Axel Lin @ 2015-08-30  3:09 UTC (permalink / raw)
  To: Mark Brown; +Cc: Manuel Lauss, alsa-devel, Liam Girdwood

Use devm_ioremap_resource() instead of open code.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 sound/soc/au1x/psc-i2s.c | 16 +++-------------
 1 file changed, 3 insertions(+), 13 deletions(-)

diff --git a/sound/soc/au1x/psc-i2s.c b/sound/soc/au1x/psc-i2s.c
index e742ef6..38e853a 100644
--- a/sound/soc/au1x/psc-i2s.c
+++ b/sound/soc/au1x/psc-i2s.c
@@ -305,19 +305,9 @@ static int au1xpsc_i2s_drvprobe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!iores)
-		return -ENODEV;
-
-	ret = -EBUSY;
-	if (!devm_request_mem_region(&pdev->dev, iores->start,
-				     resource_size(iores),
-				     pdev->name))
-		return -EBUSY;
-
-	wd->mmio = devm_ioremap(&pdev->dev, iores->start,
-				resource_size(iores));
-	if (!wd->mmio)
-		return -EBUSY;
+	wd->mmio = devm_ioremap_resource(&pdev->dev, iores);
+	if (IS_ERR(wd->mmio))
+		return PTR_ERR(wd->mmio);
 
 	dmares = platform_get_resource(pdev, IORESOURCE_DMA, 0);
 	if (!dmares)
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: au1x: psc-i2s: Convert to use devm_ioremap_resource
  2015-08-30  3:09 [PATCH] ASoC: au1x: psc-i2s: Convert to use devm_ioremap_resource Axel Lin
@ 2015-08-30  6:22 ` Manuel Lauss
  2015-08-30 11:26 ` Applied "ASoC: au1x: psc-i2s: Convert to use devm_ioremap_resource" to the asoc tree Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Manuel Lauss @ 2015-08-30  6:22 UTC (permalink / raw)
  To: Axel Lin; +Cc: alsa-devel, Mark Brown, Liam Girdwood

On Sun, Aug 30, 2015 at 5:09 AM, Axel Lin <axel.lin@ingics.com> wrote:
> Use devm_ioremap_resource() instead of open code.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
>  sound/soc/au1x/psc-i2s.c | 16 +++-------------
>  1 file changed, 3 insertions(+), 13 deletions(-)
>
> diff --git a/sound/soc/au1x/psc-i2s.c b/sound/soc/au1x/psc-i2s.c
> index e742ef6..38e853a 100644
> --- a/sound/soc/au1x/psc-i2s.c
> +++ b/sound/soc/au1x/psc-i2s.c
> @@ -305,19 +305,9 @@ static int au1xpsc_i2s_drvprobe(struct platform_device *pdev)
>                 return -ENOMEM;
>
>         iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -       if (!iores)
> -               return -ENODEV;
> -
> -       ret = -EBUSY;
> -       if (!devm_request_mem_region(&pdev->dev, iores->start,
> -                                    resource_size(iores),
> -                                    pdev->name))
> -               return -EBUSY;
> -
> -       wd->mmio = devm_ioremap(&pdev->dev, iores->start,
> -                               resource_size(iores));
> -       if (!wd->mmio)
> -               return -EBUSY;
> +       wd->mmio = devm_ioremap_resource(&pdev->dev, iores);
> +       if (IS_ERR(wd->mmio))
> +               return PTR_ERR(wd->mmio);
>
>         dmares = platform_get_resource(pdev, IORESOURCE_DMA, 0);
>         if (!dmares)
> --


Acked-by: Manuel Lauss <manuel.lauss@gmail.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Applied "ASoC: au1x: psc-i2s: Convert to use devm_ioremap_resource" to the asoc tree
  2015-08-30  3:09 [PATCH] ASoC: au1x: psc-i2s: Convert to use devm_ioremap_resource Axel Lin
  2015-08-30  6:22 ` Manuel Lauss
@ 2015-08-30 11:26 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2015-08-30 11:26 UTC (permalink / raw)
  To: Axel Lin, Manuel Lauss, Mark Brown; +Cc: alsa-devel

The patch

   ASoC: au1x: psc-i2s: Convert to use devm_ioremap_resource

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From fd63542fc5492b86158dbd53ce5de764f171b1b6 Mon Sep 17 00:00:00 2001
From: Axel Lin <axel.lin@ingics.com>
Date: Sun, 30 Aug 2015 11:09:49 +0800
Subject: [PATCH] ASoC: au1x: psc-i2s: Convert to use devm_ioremap_resource

Use devm_ioremap_resource() instead of open code.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/au1x/psc-i2s.c | 16 +++-------------
 1 file changed, 3 insertions(+), 13 deletions(-)

diff --git a/sound/soc/au1x/psc-i2s.c b/sound/soc/au1x/psc-i2s.c
index e742ef6..38e853a 100644
--- a/sound/soc/au1x/psc-i2s.c
+++ b/sound/soc/au1x/psc-i2s.c
@@ -305,19 +305,9 @@ static int au1xpsc_i2s_drvprobe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!iores)
-		return -ENODEV;
-
-	ret = -EBUSY;
-	if (!devm_request_mem_region(&pdev->dev, iores->start,
-				     resource_size(iores),
-				     pdev->name))
-		return -EBUSY;
-
-	wd->mmio = devm_ioremap(&pdev->dev, iores->start,
-				resource_size(iores));
-	if (!wd->mmio)
-		return -EBUSY;
+	wd->mmio = devm_ioremap_resource(&pdev->dev, iores);
+	if (IS_ERR(wd->mmio))
+		return PTR_ERR(wd->mmio);
 
 	dmares = platform_get_resource(pdev, IORESOURCE_DMA, 0);
 	if (!dmares)
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-08-30 14:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-30  3:09 [PATCH] ASoC: au1x: psc-i2s: Convert to use devm_ioremap_resource Axel Lin
2015-08-30  6:22 ` Manuel Lauss
2015-08-30 11:26 ` Applied "ASoC: au1x: psc-i2s: Convert to use devm_ioremap_resource" to the asoc tree Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.