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

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Stefan Agner <stefan@agner.ch>
Cc: Adrian Alonso <aalonso@freescale.com>
Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
14 files changed:
drivers/pinctrl/freescale/pinctrl-imx.c
drivers/pinctrl/freescale/pinctrl-imx.h
drivers/pinctrl/freescale/pinctrl-imx25.c
drivers/pinctrl/freescale/pinctrl-imx35.c
drivers/pinctrl/freescale/pinctrl-imx50.c
drivers/pinctrl/freescale/pinctrl-imx51.c
drivers/pinctrl/freescale/pinctrl-imx53.c
drivers/pinctrl/freescale/pinctrl-imx6dl.c
drivers/pinctrl/freescale/pinctrl-imx6q.c
drivers/pinctrl/freescale/pinctrl-imx6sl.c
drivers/pinctrl/freescale/pinctrl-imx6sx.c
drivers/pinctrl/freescale/pinctrl-imx6ul.c
drivers/pinctrl/freescale/pinctrl-imx7d.c
drivers/pinctrl/freescale/pinctrl-vf610.c

index 46210512d8ecff75cac22f306928798af8436454..74d603501eec5fe3e4cbef615e90e2cd188c1548 100644 (file)
@@ -790,7 +790,7 @@ int imx_pinctrl_probe(struct platform_device *pdev,
        ipctl->info = info;
        ipctl->dev = info->dev;
        platform_set_drvdata(pdev, ipctl);
-       ipctl->pctl = pinctrl_register(&imx_pinctrl_desc, &pdev->dev, ipctl);
+       ipctl->pctl = devm_pinctrl_register(&pdev->dev, &imx_pinctrl_desc, ipctl);
        if (IS_ERR(ipctl->pctl)) {
                dev_err(&pdev->dev, "could not register IMX pinctrl driver\n");
                return PTR_ERR(ipctl->pctl);
@@ -800,12 +800,3 @@ int imx_pinctrl_probe(struct platform_device *pdev,
 
        return 0;
 }
-
-int imx_pinctrl_remove(struct platform_device *pdev)
-{
-       struct imx_pinctrl *ipctl = platform_get_drvdata(pdev);
-
-       pinctrl_unregister(ipctl->pctl);
-
-       return 0;
-}
index 3b8bd81a39a4362172956933becd64ccad3f7afd..8af8aa2897abfaec7a8b281a2e54704a1fa13e4e 100644 (file)
@@ -99,5 +99,4 @@ struct imx_pinctrl_soc_info {
 
 int imx_pinctrl_probe(struct platform_device *pdev,
                        struct imx_pinctrl_soc_info *info);
-int imx_pinctrl_remove(struct platform_device *pdev);
 #endif /* __DRIVERS_PINCTRL_IMX_H */
index 293ed4381cc0e08c1bb195bbb9f535fba66075ed..81ad546d74bb14ffc46105a8ccf90334872d0ff7 100644 (file)
@@ -331,7 +331,6 @@ static struct platform_driver imx25_pinctrl_driver = {
                .of_match_table = of_match_ptr(imx25_pinctrl_of_match),
        },
        .probe = imx25_pinctrl_probe,
-       .remove = imx_pinctrl_remove,
 };
 
 static int __init imx25_pinctrl_init(void)
index 9109c10c5dab1ae0378fd50605d32316af4d750f..13eb224a29a920e4b93413e5570163e17b978010 100644 (file)
@@ -1021,7 +1021,6 @@ static struct platform_driver imx35_pinctrl_driver = {
                .of_match_table = imx35_pinctrl_of_match,
        },
        .probe = imx35_pinctrl_probe,
-       .remove = imx_pinctrl_remove,
 };
 
 static int __init imx35_pinctrl_init(void)
index 8acc4d960cfa3f833565a51386d896879bd39132..95a36c88b66a0ccb27f2ae8a641b234c093d0712 100644 (file)
@@ -408,7 +408,6 @@ static struct platform_driver imx50_pinctrl_driver = {
                .of_match_table = of_match_ptr(imx50_pinctrl_of_match),
        },
        .probe = imx50_pinctrl_probe,
-       .remove = imx_pinctrl_remove,
 };
 
 static int __init imx50_pinctrl_init(void)
index 8dec494aa2c677e1ee4142f2b4bfc50fed926050..0863e5279896c52e392abc73aceaf93c6429a1bf 100644 (file)
@@ -784,7 +784,6 @@ static struct platform_driver imx51_pinctrl_driver = {
                .of_match_table = imx51_pinctrl_of_match,
        },
        .probe = imx51_pinctrl_probe,
-       .remove = imx_pinctrl_remove,
 };
 
 static int __init imx51_pinctrl_init(void)
index d39dfd6a3a44b68b6b9843d615c571e38b217349..64c9cbe2a5df723fe885b73761209f0f851c6b0a 100644 (file)
@@ -471,7 +471,6 @@ static struct platform_driver imx53_pinctrl_driver = {
                .of_match_table = imx53_pinctrl_of_match,
        },
        .probe = imx53_pinctrl_probe,
-       .remove = imx_pinctrl_remove,
 };
 
 static int __init imx53_pinctrl_init(void)
index 5a2cdb0549cefba4baeb79be44f712b7c7d64c75..de17bac8ad89dfd29a58e5e06472350614543fab 100644 (file)
@@ -477,7 +477,6 @@ static struct platform_driver imx6dl_pinctrl_driver = {
                .of_match_table = imx6dl_pinctrl_of_match,
        },
        .probe = imx6dl_pinctrl_probe,
-       .remove = imx_pinctrl_remove,
 };
 
 static int __init imx6dl_pinctrl_init(void)
index 7d50a36b1086919a7ded811a498f4af97850b21b..55cd8a0e367d5d73aca3360e48887b9ffc206d50 100644 (file)
@@ -483,7 +483,6 @@ static struct platform_driver imx6q_pinctrl_driver = {
                .of_match_table = imx6q_pinctrl_of_match,
        },
        .probe = imx6q_pinctrl_probe,
-       .remove = imx_pinctrl_remove,
 };
 
 static int __init imx6q_pinctrl_init(void)
index e27d17fdc69d8f670458602d7590b7df6ae7da63..bf455b8e73fcaba2da51b94a1707419e1b72a090 100644 (file)
@@ -384,7 +384,6 @@ static struct platform_driver imx6sl_pinctrl_driver = {
                .of_match_table = imx6sl_pinctrl_of_match,
        },
        .probe = imx6sl_pinctrl_probe,
-       .remove = imx_pinctrl_remove,
 };
 
 static int __init imx6sl_pinctrl_init(void)
index 117180c26c500d139157030735f9fc443950036b..84118c388cc5d4f4de9372b4ff42b2d0bb91a013 100644 (file)
@@ -387,7 +387,6 @@ static struct platform_driver imx6sx_pinctrl_driver = {
                .of_match_table = of_match_ptr(imx6sx_pinctrl_of_match),
        },
        .probe = imx6sx_pinctrl_probe,
-       .remove = imx_pinctrl_remove,
 };
 
 static int __init imx6sx_pinctrl_init(void)
index 78627c70c6baa66e89ba98190f2b915a5bc8df22..c707fdd933ecace46d23d68418c8fb00623c89dc 100644 (file)
@@ -303,7 +303,6 @@ static struct platform_driver imx6ul_pinctrl_driver = {
                .of_match_table = of_match_ptr(imx6ul_pinctrl_of_match),
        },
        .probe = imx6ul_pinctrl_probe,
-       .remove = imx_pinctrl_remove,
 };
 
 static int __init imx6ul_pinctrl_init(void)
index 1c89613eb4b75d6a943318a5ccccae8fe3df5b02..d30d91f80dfdb695db646cc475f036f6f7df351c 100644 (file)
@@ -395,7 +395,6 @@ static struct platform_driver imx7d_pinctrl_driver = {
                .of_match_table = of_match_ptr(imx7d_pinctrl_of_match),
        },
        .probe = imx7d_pinctrl_probe,
-       .remove = imx_pinctrl_remove,
 };
 
 static int __init imx7d_pinctrl_init(void)
index 587d1ff6210efb62341b792d0318b412c0a4d046..6d81be096bc0d9bc3949c86b5edbdfa924a6b249 100644 (file)
@@ -318,7 +318,6 @@ static struct platform_driver vf610_pinctrl_driver = {
                .of_match_table = vf610_pinctrl_of_match,
        },
        .probe = vf610_pinctrl_probe,
-       .remove = imx_pinctrl_remove,
 };
 
 static int __init vf610_pinctrl_init(void)