From: Laxman Dewangan Date: Wed, 24 Feb 2016 09:14:07 +0000 (+0530) Subject: pinctrl: stm32: Use devm_pinctrl_register() for pinctrl registration X-Git-Tag: v4.14-rc1~3209^2~42 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=88edad04d9bc0f87e44d5a44f438a399c31432ba;p=platform%2Fkernel%2Flinux-rpi.git pinctrl: stm32: Use devm_pinctrl_register() for pinctrl registration Use devm_pinctrl_register() for pin control registration. Signed-off-by: Laxman Dewangan Cc: Maxime Coquelin Cc: Patrice Chotard Acked-by: Maxime Coquelin Signed-off-by: Linus Walleij --- diff --git a/drivers/pinctrl/stm32/pinctrl-stm32.c b/drivers/pinctrl/stm32/pinctrl-stm32.c index b97b7c0..72b7904 100644 --- a/drivers/pinctrl/stm32/pinctrl-stm32.c +++ b/drivers/pinctrl/stm32/pinctrl-stm32.c @@ -813,10 +813,11 @@ int stm32_pctl_probe(struct platform_device *pdev) pctl->pctl_desc.pmxops = &stm32_pmx_ops; pctl->dev = &pdev->dev; - pctl->pctl_dev = pinctrl_register(&pctl->pctl_desc, &pdev->dev, pctl); - if (!pctl->pctl_dev) { + pctl->pctl_dev = devm_pinctrl_register(&pdev->dev, &pctl->pctl_desc, + pctl); + if (IS_ERR(pctl->pctl_dev)) { dev_err(&pdev->dev, "Failed pinctrl registration\n"); - return -EINVAL; + return PTR_ERR(pctl->pctl_dev); } for (i = 0; i < pctl->nbanks; i++)