pinctrl: 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. devm_ioremap_resource() provides its own error messages so all explicit error messages can be removed from the failure code paths. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Cc: Linus Walleij <linus.walleij@linaro.org> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
1684789f86
commit
9e0c1fb29a
@@ -1503,10 +1503,9 @@ static int at91_gpio_probe(struct platform_device *pdev)
|
||||
goto err;
|
||||
}
|
||||
|
||||
at91_chip->regbase = devm_request_and_ioremap(&pdev->dev, res);
|
||||
if (!at91_chip->regbase) {
|
||||
dev_err(&pdev->dev, "failed to map registers, ignoring.\n");
|
||||
ret = -EBUSY;
|
||||
at91_chip->regbase = devm_ioremap_resource(&pdev->dev, res);
|
||||
if (IS_ERR(at91_chip->regbase)) {
|
||||
ret = PTR_ERR(at91_chip->regbase);
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user