pinctrl: bcm281xx: 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>
Wed, 20 Apr 2016 22:01:49 +0000 (00:01 +0200)
Use devm_pinctrl_register() for pin control registration.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Ray Jui <rjui@broadcom.com>
Cc: linux-rpi-kernel@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: bcm-kernel-feedback-list@broadcom.com
Acked-by: Ray Jui <ray.jui@broadcom.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/bcm/pinctrl-bcm281xx.c

index f043b83b18f0096af6ebbecd731f8319243e1dbc..582f6df446e8f43389e194343b6a61503b9e0d3c 100644 (file)
@@ -1422,9 +1422,7 @@ static int __init bcm281xx_pinctrl_probe(struct platform_device *pdev)
        bcm281xx_pinctrl_desc.pins = bcm281xx_pinctrl.pins;
        bcm281xx_pinctrl_desc.npins = bcm281xx_pinctrl.npins;
 
-       pctl = pinctrl_register(&bcm281xx_pinctrl_desc,
-                               &pdev->dev,
-                               pdata);
+       pctl = devm_pinctrl_register(&pdev->dev, &bcm281xx_pinctrl_desc, pdata);
        if (IS_ERR(pctl)) {
                dev_err(&pdev->dev, "Failed to register pinctrl\n");
                return PTR_ERR(pctl);