Commit 808c513e authored by Sachin Kamat's avatar Sachin Kamat Committed by Linus Walleij

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: default avatarSachin Kamat <>
Reviewed-by: default avatarThierry Reding <>
Acked-by: default avatarTony Prisk <>
Signed-off-by: Linus Walleij's avatarLinus Walleij <>
parent 1cfe6f8c
......@@ -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);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment