pinctrl: pistachio: 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:24 +0000 (09:23 +0200)
Use devm_pinctrl_register() for pin control registration.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-pistachio.c

index 846fe91aa1553e95b0415e4055bd61061ba960d1..a532d888855992037b0e9f512ce0ac2cecd5a897 100644 (file)
@@ -1457,8 +1457,8 @@ static int pistachio_pinctrl_probe(struct platform_device *pdev)
        pistachio_pinctrl_desc.pins = pctl->pins;
        pistachio_pinctrl_desc.npins = pctl->npins;
 
-       pctl->pctldev = pinctrl_register(&pistachio_pinctrl_desc, &pdev->dev,
-                                        pctl);
+       pctl->pctldev = devm_pinctrl_register(&pdev->dev, &pistachio_pinctrl_desc,
+                                             pctl);
        if (IS_ERR(pctl->pctldev)) {
                dev_err(&pdev->dev, "Failed to register pinctrl device\n");
                return PTR_ERR(pctl->pctldev);