]> git.karo-electronics.de Git - linux-beck.git/commitdiff
pinctrl: pxa: 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:03:04 +0000 (00:03 +0200)
Use devm_pinctrl_register() for pin control registration and clean
the error path.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Daniel Mack <daniel@zonque.org>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: linux-arm-kernel@lists.infradead.org
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pxa/pinctrl-pxa2xx.c

index 6098685f011649ccd4917236cd95d415be092dc8..866aa3ce1ac95a3866526b648e1e806aef5eba71 100644 (file)
@@ -416,7 +416,7 @@ int pxa2xx_pinctrl_init(struct platform_device *pdev,
        if (ret)
                return ret;
 
-       pctl->pctl_dev = pinctrl_register(&pctl->desc, &pdev->dev, pctl);
+       pctl->pctl_dev = devm_pinctrl_register(&pdev->dev, &pctl->desc, pctl);
        if (IS_ERR(pctl->pctl_dev)) {
                dev_err(&pdev->dev, "couldn't register pinctrl driver\n");
                return PTR_ERR(pctl->pctl_dev);