pinctrl: tegra: 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:03:28 +0000 (00:03 +0200)
Use devm_pinctrl_register() for pin control registration and remove
need of .remove callback.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Alexandre Courbot <gnurou@gmail.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/tegra/pinctrl-tegra.c
drivers/pinctrl/tegra/pinctrl-tegra.h
drivers/pinctrl/tegra/pinctrl-tegra114.c
drivers/pinctrl/tegra/pinctrl-tegra124.c
drivers/pinctrl/tegra/pinctrl-tegra20.c
drivers/pinctrl/tegra/pinctrl-tegra210.c
drivers/pinctrl/tegra/pinctrl-tegra30.c

index 053d62016e5a504c508566725a41bdf4db3fb98a..861baf29ef708734d9e90a29c302b216053dbfda 100644 (file)
@@ -735,7 +735,7 @@ int tegra_pinctrl_probe(struct platform_device *pdev,
                        return PTR_ERR(pmx->regs[i]);
        }
 
-       pmx->pctl = pinctrl_register(&tegra_pinctrl_desc, &pdev->dev, pmx);
+       pmx->pctl = devm_pinctrl_register(&pdev->dev, &tegra_pinctrl_desc, pmx);
        if (IS_ERR(pmx->pctl)) {
                dev_err(&pdev->dev, "Couldn't register pinctrl driver\n");
                return PTR_ERR(pmx->pctl);
@@ -753,13 +753,3 @@ int tegra_pinctrl_probe(struct platform_device *pdev,
        return 0;
 }
 EXPORT_SYMBOL_GPL(tegra_pinctrl_probe);
-
-int tegra_pinctrl_remove(struct platform_device *pdev)
-{
-       struct tegra_pmx *pmx = platform_get_drvdata(pdev);
-
-       pinctrl_unregister(pmx->pctl);
-
-       return 0;
-}
-EXPORT_SYMBOL_GPL(tegra_pinctrl_remove);
index 20b893443d0b27250b6d93bb93988de74b88f631..d2ced17382b56ac4dada88fefcbd8cef738bd381 100644 (file)
@@ -195,6 +195,4 @@ struct tegra_pinctrl_soc_data {
 
 int tegra_pinctrl_probe(struct platform_device *pdev,
                        const struct tegra_pinctrl_soc_data *soc_data);
-int tegra_pinctrl_remove(struct platform_device *pdev);
-
 #endif
index b831dcfa5359c1efb654b2a0de05175494f836a0..4851d169f4c7a33c37a6e69bb766b4e8fe84422b 100644 (file)
@@ -1865,7 +1865,6 @@ static struct platform_driver tegra114_pinctrl_driver = {
                .of_match_table = tegra114_pinctrl_of_match,
        },
        .probe = tegra114_pinctrl_probe,
-       .remove = tegra_pinctrl_remove,
 };
 module_platform_driver(tegra114_pinctrl_driver);
 
index 199d301f7c3ea98a939b31e19ed664f5a23e6e0a..a0ce723a9482d4efd6937c4cd76f98ca4968a196 100644 (file)
@@ -2077,7 +2077,6 @@ static struct platform_driver tegra124_pinctrl_driver = {
                .of_match_table = tegra124_pinctrl_of_match,
        },
        .probe = tegra124_pinctrl_probe,
-       .remove = tegra_pinctrl_remove,
 };
 module_platform_driver(tegra124_pinctrl_driver);
 
index a2d0b98d72b3f6f75b851b0e4ddcf91242651c1e..09bad6980ad1e81292a6b180866511ecab903585 100644 (file)
@@ -2245,7 +2245,6 @@ static struct platform_driver tegra20_pinctrl_driver = {
                .of_match_table = tegra20_pinctrl_of_match,
        },
        .probe = tegra20_pinctrl_probe,
-       .remove = tegra_pinctrl_remove,
 };
 module_platform_driver(tegra20_pinctrl_driver);
 
index 825bf62d939ad48a2a8eda1888fccdc38995842d..2d856af389ef8a2a6997e0f41baa2a88410097d3 100644 (file)
@@ -1583,7 +1583,6 @@ static struct platform_driver tegra210_pinctrl_driver = {
                .of_match_table = tegra210_pinctrl_of_match,
        },
        .probe = tegra210_pinctrl_probe,
-       .remove = tegra_pinctrl_remove,
 };
 module_platform_driver(tegra210_pinctrl_driver);
 
index 4dc9642c914a92dde5aaeefafc79f6d7e7f63afc..fb7817fea2d942d1a3a2cb98b1d3e3b7a8cddddf 100644 (file)
@@ -2500,7 +2500,6 @@ static struct platform_driver tegra30_pinctrl_driver = {
                .of_match_table = tegra30_pinctrl_of_match,
        },
        .probe = tegra30_pinctrl_probe,
-       .remove = tegra_pinctrl_remove,
 };
 module_platform_driver(tegra30_pinctrl_driver);