pinctrl: berlin: Use devm_pinctrl_register() for pinctrl registration
authorLaxman Dewangan <ldewangan@nvidia.com>
Wed, 24 Feb 2016 09:14:07 +0000 (14:44 +0530)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 20 Apr 2016 22:02:13 +0000 (00:02 +0200)
Use devm_pinctrl_register() for pin control registration.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Antoine Ténart <antoine.tenart@free-electrons.com>
Acked-by: Antoine Tenart <antoine.tenart@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/berlin/berlin.c

index 87b17b77df029aae93bdaff74e3a9b0382c521dd..8f0dc02f7624af66be9f734f90998570ec49281d 100644 (file)
@@ -316,7 +316,8 @@ int berlin_pinctrl_probe_regmap(struct platform_device *pdev,
                return ret;
        }
 
-       pctrl->pctrl_dev = pinctrl_register(&berlin_pctrl_desc, dev, pctrl);
+       pctrl->pctrl_dev = devm_pinctrl_register(dev, &berlin_pctrl_desc,
+                                                pctrl);
        if (IS_ERR(pctrl->pctrl_dev)) {
                dev_err(dev, "failed to register pinctrl driver\n");
                return PTR_ERR(pctrl->pctrl_dev);