diff options
author | Sachin Kamat | 2013-03-04 14:39:39 +0530 |
---|---|---|
committer | Linus Walleij | 2013-03-27 16:05:10 +0100 |
commit | 808c513ee64be7cec6a7dcfff1687bc0995362bc (patch) | |
tree | 770c015fade5216691ed3fd258f1ec3e1753fd68 /drivers/gpio | |
parent | 1cfe6f8cb1078039a0f8dfc833a4ae752220d2db (diff) |
gpio/vt8500: Convert to devm_ioremap_resource()
Use the newly introduced devm_ioremap_resource() instead of
devm_request_and_ioremap() 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: Sachin Kamat <sachin.kamat@linaro.org>
Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>
Acked-by: Tony Prisk <linux@prisktech.co.nz>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpio-vt8500.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/gpio/gpio-vt8500.c b/drivers/gpio/gpio-vt8500.c index 81683ca35ac1..b2d8d6f0c522 100644 --- a/drivers/gpio/gpio-vt8500.c +++ b/drivers/gpio/gpio-vt8500.c @@ -309,11 +309,9 @@ static int vt8500_gpio_probe(struct platform_device *pdev) return -ENODEV; } - gpio_base = devm_request_and_ioremap(&pdev->dev, res); - if (!gpio_base) { - dev_err(&pdev->dev, "Unable to map GPIO registers\n"); - return -ENOMEM; - } + gpio_base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(gpio_base)) + return PTR_ERR(gpio_base); ret = vt8500_add_chips(pdev, gpio_base, of_id->data); |