diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2013-01-21 14:09:14 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-22 23:41:57 +0400 |
commit | 9e0c1fb29a7c257a31c321c2437617b6b4d66168 (patch) | |
tree | ee0b93ff33eb3156339a1e72411c8bbad0c8c415 /drivers/pinctrl/pinctrl-coh901.c | |
parent | 1684789f86cbd6a1aff82970992c711898b19995 (diff) | |
download | linux-9e0c1fb29a7c257a31c321c2437617b6b4d66168.tar.xz |
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-coh901.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-coh901.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/pinctrl/pinctrl-coh901.c b/drivers/pinctrl/pinctrl-coh901.c index fbb37154471c..8b7e7bc2226b 100644 --- a/drivers/pinctrl/pinctrl-coh901.c +++ b/drivers/pinctrl/pinctrl-coh901.c @@ -715,11 +715,9 @@ static int __init u300_gpio_probe(struct platform_device *pdev) return -ENODEV; } - gpio->base = devm_request_and_ioremap(&pdev->dev, memres); - if (!gpio->base) { - dev_err(gpio->dev, "could not get remap memory\n"); - return -ENOMEM; - } + gpio->base = devm_ioremap_resource(&pdev->dev, memres); + if (IS_ERR(gpio->base)) + return PTR_ERR(gpio->base); gpio->clk = devm_clk_get(gpio->dev, NULL); if (IS_ERR(gpio->clk)) { |