linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 11/33] iio: Convert to devm_ioremap_resource()
       [not found] <1358762966-20791-1-git-send-email-thierry.reding@avionic-design.de>
@ 2013-01-21 10:09 ` Thierry Reding
  2013-01-22 12:12   ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Thierry Reding @ 2013-01-21 10:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, Dmitry Torokhov, Arnd Bergmann, Wolfram Sang,
	Jonathan Cameron, linux-iio

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

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Cc: Jonathan Cameron <jic23@cam.ac.uk>
Cc: linux-iio@vger.kernel.org
---
 drivers/iio/adc/at91_adc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/iio/adc/at91_adc.c b/drivers/iio/adc/at91_adc.c
index a526c0e..83c836b 100644
--- a/drivers/iio/adc/at91_adc.c
+++ b/drivers/iio/adc/at91_adc.c
@@ -557,9 +557,9 @@ static int at91_adc_probe(struct platform_device *pdev)
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 
-	st->reg_base = devm_request_and_ioremap(&pdev->dev, res);
-	if (!st->reg_base) {
-		ret = -ENOMEM;
+	st->reg_base = devm_ioremap_resource(&pdev->dev, res);
+	if (IS_ERR(st->reg_base)) {
+		ret = PTR_ERR(st->reg_base);
 		goto error_free_device;
 	}
 
-- 
1.8.1.1


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

* Re: [PATCH 11/33] iio: Convert to devm_ioremap_resource()
  2013-01-21 10:09 ` [PATCH 11/33] iio: Convert to devm_ioremap_resource() Thierry Reding
@ 2013-01-22 12:12   ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2013-01-22 12:12 UTC (permalink / raw)
  To: Thierry Reding
  Cc: linux-kernel, Greg Kroah-Hartman, Dmitry Torokhov, Arnd Bergmann,
	Wolfram Sang, Jonathan Cameron, linux-iio

On 01/21/2013 10:09 AM, Thierry Reding 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: Thierry Reding <thierry.reding@avionic-design.de>
> Cc: Jonathan Cameron <jic23@cam.ac.uk>
> Cc: linux-iio@vger.kernel.org
Looks fine to me.

Acked-by: Jonathan Cameron <jic23@kernel.org>
> ---
>  drivers/iio/adc/at91_adc.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/iio/adc/at91_adc.c b/drivers/iio/adc/at91_adc.c
> index a526c0e..83c836b 100644
> --- a/drivers/iio/adc/at91_adc.c
> +++ b/drivers/iio/adc/at91_adc.c
> @@ -557,9 +557,9 @@ static int at91_adc_probe(struct platform_device *pdev)
>  
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  
> -	st->reg_base = devm_request_and_ioremap(&pdev->dev, res);
> -	if (!st->reg_base) {
> -		ret = -ENOMEM;
> +	st->reg_base = devm_ioremap_resource(&pdev->dev, res);
> +	if (IS_ERR(st->reg_base)) {
> +		ret = PTR_ERR(st->reg_base);
>  		goto error_free_device;
>  	}
>  
> 

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

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

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1358762966-20791-1-git-send-email-thierry.reding@avionic-design.de>
2013-01-21 10:09 ` [PATCH 11/33] iio: Convert to devm_ioremap_resource() Thierry Reding
2013-01-22 12:12   ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).