pinctrl: nomadic: 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:02:42 +0000 (00:02 +0200)
Use devm_pinctrl_register() for pin control registration.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Alessandro Rubini <rubini@unipv.it>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/nomadik/pinctrl-abx500.c
drivers/pinctrl/nomadik/pinctrl-nomadik.c

index 532356823eead5bcb041c1ecb339e5c28aec4f2d..7d343c22c90c083dbaf4e652bd98d0133a8dc33a 100644 (file)
@@ -1212,7 +1212,8 @@ static int abx500_gpio_probe(struct platform_device *pdev)
 
        abx500_pinctrl_desc.pins = pct->soc->pins;
        abx500_pinctrl_desc.npins = pct->soc->npins;
-       pct->pctldev = pinctrl_register(&abx500_pinctrl_desc, &pdev->dev, pct);
+       pct->pctldev = devm_pinctrl_register(&pdev->dev, &abx500_pinctrl_desc,
+                                            pct);
        if (IS_ERR(pct->pctldev)) {
                dev_err(&pdev->dev,
                        "could not register abx500 pinctrl driver\n");
index c9c8c17678d72b031eea8d4d8f5e6b3e961e9ac1..7a7b9846ff579935e19e3c8ef03e03d60aeecb09 100644 (file)
@@ -2044,7 +2044,7 @@ static int nmk_pinctrl_probe(struct platform_device *pdev)
        nmk_pinctrl_desc.npins = npct->soc->npins;
        npct->dev = &pdev->dev;
 
-       npct->pctl = pinctrl_register(&nmk_pinctrl_desc, &pdev->dev, npct);
+       npct->pctl = devm_pinctrl_register(&pdev->dev, &nmk_pinctrl_desc, npct);
        if (IS_ERR(npct->pctl)) {
                dev_err(&pdev->dev, "could not register Nomadik pinctrl driver\n");
                return PTR_ERR(npct->pctl);