pinctrl: Convert to devm_ioremap_resource()
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / pinctrl / pinctrl-at91.c
index 471c71f7f8b611fb87e0d2330627801b5124288d..75933a6aa8284c0cbf466a968ed2c846c7c14d69 100644 (file)
@@ -1503,10 +1503,9 @@ static int at91_gpio_probe(struct platform_device *pdev)
                goto err;
        }
 
-       at91_chip->regbase = devm_request_and_ioremap(&pdev->dev, res);
-       if (!at91_chip->regbase) {
-               dev_err(&pdev->dev, "failed to map registers, ignoring.\n");
-               ret = -EBUSY;
+       at91_chip->regbase = devm_ioremap_resource(&pdev->dev, res);
+       if (IS_ERR(at91_chip->regbase)) {
+               ret = PTR_ERR(at91_chip->regbase);
                goto err;
        }