aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/adc/at91_adc.c
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@avionic-design.de>2013-01-21 05:09:04 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-22 14:41:56 -0500
commit5fd984662cfe1f7c6616992380937a07a918a6a6 (patch)
treed4f4b143cc8a421d61f22328f5476a177b071d0c /drivers/iio/adc/at91_adc.c
parent641d03422a59b1e790b7edabb16bc62da71130c3 (diff)
iio: Convert to devm_ioremap_resource()
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> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/iio/adc/at91_adc.c')
-rw-r--r--drivers/iio/adc/at91_adc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/iio/adc/at91_adc.c b/drivers/iio/adc/at91_adc.c
index a526c0e3aaa8..83c836ba600f 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)
557 557
558 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 558 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
559 559
560 st->reg_base = devm_request_and_ioremap(&pdev->dev, res); 560 st->reg_base = devm_ioremap_resource(&pdev->dev, res);
561 if (!st->reg_base) { 561 if (IS_ERR(st->reg_base)) {
562 ret = -ENOMEM; 562 ret = PTR_ERR(st->reg_base);
563 goto error_free_device; 563 goto error_free_device;
564 } 564 }
565 565