diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2013-01-21 05:09:14 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-22 14:41:57 -0500 |
commit | 9e0c1fb29a7c257a31c321c2437617b6b4d66168 (patch) | |
tree | ee0b93ff33eb3156339a1e72411c8bbad0c8c415 /drivers/pinctrl/pinctrl-samsung.c | |
parent | 1684789f86cbd6a1aff82970992c711898b19995 (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-samsung.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-samsung.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/pinctrl/pinctrl-samsung.c b/drivers/pinctrl/pinctrl-samsung.c index fd7b24cd8908..7e6669cfa58f 100644 --- a/drivers/pinctrl/pinctrl-samsung.c +++ b/drivers/pinctrl/pinctrl-samsung.c | |||
@@ -917,11 +917,9 @@ static int samsung_pinctrl_probe(struct platform_device *pdev) | |||
917 | return -ENOENT; | 917 | return -ENOENT; |
918 | } | 918 | } |
919 | 919 | ||
920 | drvdata->virt_base = devm_request_and_ioremap(&pdev->dev, res); | 920 | drvdata->virt_base = devm_ioremap_resource(&pdev->dev, res); |
921 | if (!drvdata->virt_base) { | 921 | if (IS_ERR(drvdata->virt_base)) |
922 | dev_err(dev, "ioremap failed\n"); | 922 | return PTR_ERR(drvdata->virt_base); |
923 | return -ENODEV; | ||
924 | } | ||
925 | 923 | ||
926 | res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); | 924 | res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); |
927 | if (res) | 925 | if (res) |