Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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;
	}