Skip to content

Commit

Permalink
iio: Convert to devm_ioremap_resource()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thierry Reding authored and Greg Kroah-Hartman committed Jan 22, 2013
1 parent 641d034 commit 5fd9846
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/iio/adc/at91_adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 5fd9846

Please sign in to comment.