pinctrl: samsung: Use devm_pinctrl_register() for pinctrl registration
authorLaxman Dewangan <ldewangan@nvidia.com>
Sun, 28 Feb 2016 09:06:42 +0000 (14:36 +0530)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 20 Apr 2016 22:03:11 +0000 (00:03 +0200)
Use devm_pinctrl_register() for pin control registration.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Tomasz Figa <tomasz.figa@gmail.com>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/samsung/pinctrl-samsung.c

index 5cc97f85db02d4986b3c9249a1116d952838fde0..ed0b70881e19b9ce1476c025a19473dff500af5d 100644 (file)
@@ -884,7 +884,8 @@ static int samsung_pinctrl_register(struct platform_device *pdev,
        if (ret)
                return ret;
 
-       drvdata->pctl_dev = pinctrl_register(ctrldesc, &pdev->dev, drvdata);
+       drvdata->pctl_dev = devm_pinctrl_register(&pdev->dev, ctrldesc,
+                                                 drvdata);
        if (IS_ERR(drvdata->pctl_dev)) {
                dev_err(&pdev->dev, "could not register pinctrl driver\n");
                return PTR_ERR(drvdata->pctl_dev);