pinctrl: st: 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>
Thu, 21 Apr 2016 07:23:25 +0000 (09:23 +0200)
Use devm_pinctrl_register() for pin control registration.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Srinivas Kandagatla <srinivas.kandagatla@gmail.com>
Cc: Maxime Coquelin <maxime.coquelin@st.com>
Cc: Patrice Chotard <patrice.chotard@st.com>
Cc: kernel@stlinux.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-st.c

index cab66c64149fc103aedad05784e46a35e95fccd1..d0ba968af5bb19acb2d5e1b35316898340af852a 100644 (file)
@@ -1724,7 +1724,7 @@ static int st_pctl_probe(struct platform_device *pdev)
        pctl_desc->confops      = &st_confops;
        pctl_desc->name         = dev_name(&pdev->dev);
 
-       info->pctl = pinctrl_register(pctl_desc, &pdev->dev, info);
+       info->pctl = devm_pinctrl_register(&pdev->dev, pctl_desc, info);
        if (IS_ERR(info->pctl)) {
                dev_err(&pdev->dev, "Failed pinctrl registration\n");
                return PTR_ERR(info->pctl);