pinctrl: tegra: init Tegra20/30 at module_init time
authorStephen Warren <swarren@nvidia.com>
Fri, 7 Mar 2014 19:22:15 +0000 (12:22 -0700)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 12 Mar 2014 14:22:29 +0000 (15:22 +0100)
The Tegra20/30 pinctrl drivers currently initializes at arch_initcall,
whereas Tegra114/124 pinctrl drivers initialize at module_init time.
Convert Tegra20/30 to work the same way as the other drivers.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-tegra20.c
drivers/pinctrl/pinctrl-tegra30.c

index fcfb7d012c5b68bda551917f89c657956f2af6dd..a8ceb08172b2aac18dcd400f41e327d30ae45fa8 100644 (file)
@@ -2881,18 +2881,7 @@ static struct platform_driver tegra20_pinctrl_driver = {
        .probe = tegra20_pinctrl_probe,
        .remove = tegra_pinctrl_remove,
 };
-
-static int __init tegra20_pinctrl_init(void)
-{
-       return platform_driver_register(&tegra20_pinctrl_driver);
-}
-arch_initcall(tegra20_pinctrl_init);
-
-static void __exit tegra20_pinctrl_exit(void)
-{
-       platform_driver_unregister(&tegra20_pinctrl_driver);
-}
-module_exit(tegra20_pinctrl_exit);
+module_platform_driver(tegra20_pinctrl_driver);
 
 MODULE_AUTHOR("Stephen Warren <swarren@nvidia.com>");
 MODULE_DESCRIPTION("NVIDIA Tegra20 pinctrl driver");
index 2300deba25bd4b39157a5a8f1e8524f965488bd3..4e591f62cfa111ed9b74cc63deba2587641d11c3 100644 (file)
@@ -3745,18 +3745,7 @@ static struct platform_driver tegra30_pinctrl_driver = {
        .probe = tegra30_pinctrl_probe,
        .remove = tegra_pinctrl_remove,
 };
-
-static int __init tegra30_pinctrl_init(void)
-{
-       return platform_driver_register(&tegra30_pinctrl_driver);
-}
-arch_initcall(tegra30_pinctrl_init);
-
-static void __exit tegra30_pinctrl_exit(void)
-{
-       platform_driver_unregister(&tegra30_pinctrl_driver);
-}
-module_exit(tegra30_pinctrl_exit);
+module_platform_driver(tegra30_pinctrl_driver);
 
 MODULE_AUTHOR("Stephen Warren <swarren@nvidia.com>");
 MODULE_DESCRIPTION("NVIDIA Tegra30 pinctrl driver");