pinctrl: pic32: 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>
Reviewed-by: Joshua Henderson <joshua.henderson@microchip.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-pic32.c

index 87ee1c4e70a739f5d7b2070b57635ab41a1fd12b..31ceb958b3febf5e2b61b991f8af6d6245a70189 100644 (file)
@@ -2194,7 +2194,8 @@ static int pic32_pinctrl_probe(struct platform_device *pdev)
        pic32_pinctrl_desc.custom_params = pic32_mpp_bindings;
        pic32_pinctrl_desc.num_custom_params = ARRAY_SIZE(pic32_mpp_bindings);
 
-       pctl->pctldev = pinctrl_register(&pic32_pinctrl_desc, &pdev->dev, pctl);
+       pctl->pctldev = devm_pinctrl_register(&pdev->dev, &pic32_pinctrl_desc,
+                                             pctl);
        if (IS_ERR(pctl->pctldev)) {
                dev_err(&pdev->dev, "Failed to register pinctrl device\n");
                return PTR_ERR(pctl->pctldev);