Commit 5fd98466 authored by Thierry Reding's avatar Thierry Reding Committed by Greg Kroah-Hartman

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: default avatarThierry Reding <thierry.reding@avionic-design.de>
Acked-by: default avatarJonathan Cameron <jic23@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 641d0342
...@@ -557,9 +557,9 @@ static int at91_adc_probe(struct platform_device *pdev) ...@@ -557,9 +557,9 @@ static int at91_adc_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
st->reg_base = devm_request_and_ioremap(&pdev->dev, res); st->reg_base = devm_ioremap_resource(&pdev->dev, res);
if (!st->reg_base) { if (IS_ERR(st->reg_base)) {
ret = -ENOMEM; ret = PTR_ERR(st->reg_base);
goto error_free_device; goto error_free_device;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment