mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drivers: media: platform: convert to devm_ioremap_resource()
@ 2013-04-10 20:59 Silviu-Mihai Popescu
  2013-04-12 12:38 ` Guennadi Liakhovetski
  0 siblings, 1 reply; 2+ messages in thread
From: Silviu-Mihai Popescu @ 2013-04-10 20:59 UTC (permalink / raw)
  To: linux-media
  Cc: Guennadi Liakhovetski, Mauro Carvalho Chehab, linux-kernel,
	Silviu-Mihai Popescu

Convert all uses of devm_request_and_ioremap() to the newly introduced
devm_ioremap_resource() which provides more consistent error handling.

Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
---
 drivers/media/platform/sh_veu.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/sh_veu.c b/drivers/media/platform/sh_veu.c
index cb54c69..911f562 100644
--- a/drivers/media/platform/sh_veu.c
+++ b/drivers/media/platform/sh_veu.c
@@ -1164,9 +1164,9 @@ static int sh_veu_probe(struct platform_device *pdev)
 
 	veu->is_2h = resource_size(reg_res) == 0x22c;
 
-	veu->base = devm_request_and_ioremap(&pdev->dev, reg_res);
-	if (!veu->base)
-		return -ENOMEM;
+	veu->base = devm_ioremap_resource(&pdev->dev, reg_res);
+	if (IS_ERR(veu->base))
+		return PTR_ERR(veu->base);
 
 	ret = devm_request_threaded_irq(&pdev->dev, irq, sh_veu_isr, sh_veu_bh,
 					0, "veu", veu);
-- 
1.7.9.5


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

* Re: [PATCH] drivers: media: platform: convert to devm_ioremap_resource()
  2013-04-10 20:59 [PATCH] drivers: media: platform: convert to devm_ioremap_resource() Silviu-Mihai Popescu
@ 2013-04-12 12:38 ` Guennadi Liakhovetski
  0 siblings, 0 replies; 2+ messages in thread
From: Guennadi Liakhovetski @ 2013-04-12 12:38 UTC (permalink / raw)
  To: Silviu-Mihai Popescu; +Cc: linux-media, Mauro Carvalho Chehab, linux-kernel

Hi

On Wed, 10 Apr 2013, Silviu-Mihai Popescu wrote:

> Convert all uses of devm_request_and_ioremap() to the newly introduced
> devm_ioremap_resource() which provides more consistent error handling.
> 
> Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>

Thanks for the patch, but an equivalent one is already upstream:

http://git.linuxtv.org/media_tree.git/commitdiff/f2b4dc1a0fc8f52e06025497ce9bb252ff51f15f

Thanks
Guennadi

> ---
>  drivers/media/platform/sh_veu.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/media/platform/sh_veu.c b/drivers/media/platform/sh_veu.c
> index cb54c69..911f562 100644
> --- a/drivers/media/platform/sh_veu.c
> +++ b/drivers/media/platform/sh_veu.c
> @@ -1164,9 +1164,9 @@ static int sh_veu_probe(struct platform_device *pdev)
>  
>  	veu->is_2h = resource_size(reg_res) == 0x22c;
>  
> -	veu->base = devm_request_and_ioremap(&pdev->dev, reg_res);
> -	if (!veu->base)
> -		return -ENOMEM;
> +	veu->base = devm_ioremap_resource(&pdev->dev, reg_res);
> +	if (IS_ERR(veu->base))
> +		return PTR_ERR(veu->base);
>  
>  	ret = devm_request_threaded_irq(&pdev->dev, irq, sh_veu_isr, sh_veu_bh,
>  					0, "veu", veu);
> -- 
> 1.7.9.5
> 

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

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

end of thread, other threads:[~2013-04-12 12:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-10 20:59 [PATCH] drivers: media: platform: convert to devm_ioremap_resource() Silviu-Mihai Popescu
2013-04-12 12:38 ` Guennadi Liakhovetski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®