aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinctrl-at91.c
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@avionic-design.de>2013-01-21 05:09:14 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-22 14:41:57 -0500
commit9e0c1fb29a7c257a31c321c2437617b6b4d66168 (patch)
treeee0b93ff33eb3156339a1e72411c8bbad0c8c415 /drivers/pinctrl/pinctrl-at91.c
parent1684789f86cbd6a1aff82970992c711898b19995 (diff)
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>
Diffstat (limited to 'drivers/pinctrl/pinctrl-at91.c')
-rw-r--r--drivers/pinctrl/pinctrl-at91.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
index 471c71f7f8b6..75933a6aa828 100644
--- a/drivers/pinctrl/pinctrl-at91.c
+++ b/drivers/pinctrl/pinctrl-at91.c
@@ -1503,10 +1503,9 @@ static int at91_gpio_probe(struct platform_device *pdev)
1503 goto err; 1503 goto err;
1504 } 1504 }
1505 1505
1506 at91_chip->regbase = devm_request_and_ioremap(&pdev->dev, res); 1506 at91_chip->regbase = devm_ioremap_resource(&pdev->dev, res);
1507 if (!at91_chip->regbase) { 1507 if (IS_ERR(at91_chip->regbase)) {
1508 dev_err(&pdev->dev, "failed to map registers, ignoring.\n"); 1508 ret = PTR_ERR(at91_chip->regbase);
1509 ret = -EBUSY;
1510 goto err; 1509 goto err;
1511 } 1510 }
1512 1511