summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/spear
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@avionic-design.de>2013-01-21 11:09:14 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-22 11:41:57 -0800
commit9e0c1fb29a7c257a31c321c2437617b6b4d66168 (patch)
treeee0b93ff33eb3156339a1e72411c8bbad0c8c415 /drivers/pinctrl/spear
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/spear')
-rw-r--r--drivers/pinctrl/spear/pinctrl-plgpio.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/pinctrl/spear/pinctrl-plgpio.c b/drivers/pinctrl/spear/pinctrl-plgpio.c
index 3cf4ecd9302c..295b349a05cf 100644
--- a/drivers/pinctrl/spear/pinctrl-plgpio.c
+++ b/drivers/pinctrl/spear/pinctrl-plgpio.c
@@ -540,11 +540,9 @@ static int plgpio_probe(struct platform_device *pdev)
return -ENOMEM;
}
- plgpio->base = devm_request_and_ioremap(&pdev->dev, res);
- if (!plgpio->base) {
- dev_err(&pdev->dev, "request and ioremap fail\n");
- return -ENOMEM;
- }
+ plgpio->base = devm_ioremap_resource(&pdev->dev, res);
+ if (IS_ERR(plgpio->base))
+ return PTR_ERR(plgpio->base);
ret = plgpio_probe_dt(pdev, plgpio);
if (ret) {