From: Laxman Dewangan Date: Wed, 24 Feb 2016 09:14:07 +0000 (+0530) Subject: pinctrl: pxa: Use devm_pinctrl_register() for pinctrl registration X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6d33ee7a05341f9ddcaa9374d3d6800919e2f150;p=linux-beck.git pinctrl: pxa: Use devm_pinctrl_register() for pinctrl registration Use devm_pinctrl_register() for pin control registration and clean the error path. Signed-off-by: Laxman Dewangan Cc: Daniel Mack Cc: Haojian Zhuang Cc: Robert Jarzmik Cc: linux-arm-kernel@lists.infradead.org Acked-by: Robert Jarzmik Signed-off-by: Linus Walleij --- diff --git a/drivers/pinctrl/pxa/pinctrl-pxa2xx.c b/drivers/pinctrl/pxa/pinctrl-pxa2xx.c index 6098685f0116..866aa3ce1ac9 100644 --- a/drivers/pinctrl/pxa/pinctrl-pxa2xx.c +++ b/drivers/pinctrl/pxa/pinctrl-pxa2xx.c @@ -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);