pinctrl: mvebu: make bool drivers explicitly non-modular
authorPaul Gortmaker <paul.gortmaker@windriver.com>
Mon, 6 Feb 2017 08:03:50 +0000 (03:03 -0500)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 13 Feb 2017 13:25:49 +0000 (14:25 +0100)
None of the Kconfigs for any of these drivers are tristate, meaning
that they currently are not being built as a module by anyone.

Lets remove the modular code that is essentially orphaned, so that
when reading the drivers there is no doubt they are builtin-only.
All drivers get the exact same change, so they are handled in batch.

Changes are (1) use builtin_platform_driver, (2) dont use module.h
(3) delete module_exit related code, (4) delete MODULE_DEVICE_TABLE,
and (5) delete MODULE_LICENCE/MODULE_AUTHOR and associated tags.

For the dove driver we explicitly disallow a driver unbind, since
that doesn't have a sensible use case anyway, and it allows us to
drop the ".remove" code for non-modular drivers.

Since module_platform_driver() uses the same init level priority as
builtin_platform_driver() the init ordering remains unchanged with
this commit.

We deleted the MODULE_LICENSE etc. tags since all that information
is already contained at the top of the file in the comments.

Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/mvebu/pinctrl-armada-370.c
drivers/pinctrl/mvebu/pinctrl-armada-375.c
drivers/pinctrl/mvebu/pinctrl-armada-38x.c
drivers/pinctrl/mvebu/pinctrl-armada-39x.c
drivers/pinctrl/mvebu/pinctrl-armada-xp.c
drivers/pinctrl/mvebu/pinctrl-dove.c
drivers/pinctrl/mvebu/pinctrl-kirkwood.c
drivers/pinctrl/mvebu/pinctrl-mvebu.c
drivers/pinctrl/mvebu/pinctrl-orion.c

index c2de4f8ee488859aba4881a5ca8aa354332f1570..9feba9a5ccb7eaa93deef96943b435be8ddd3ff7 100644 (file)
@@ -14,7 +14,6 @@
 #include <linux/err.h>
 #include <linux/init.h>
 #include <linux/io.h>
-#include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/clk.h>
 #include <linux/of.h>
@@ -406,9 +405,4 @@ static struct platform_driver armada_370_pinctrl_driver = {
        },
        .probe = armada_370_pinctrl_probe,
 };
-
-module_platform_driver(armada_370_pinctrl_driver);
-
-MODULE_AUTHOR("Thomas Petazzoni <thomas.petazzoni@free-electrons.com>");
-MODULE_DESCRIPTION("Marvell Armada 370 pinctrl driver");
-MODULE_LICENSE("GPL v2");
+builtin_platform_driver(armada_370_pinctrl_driver);
index 30cbf23b0b03bd50503b0cb218ccea6fbfd04b89..b7de8abccd482486a9fb9e22ae02190489ba3d05 100644 (file)
@@ -14,7 +14,6 @@
 #include <linux/err.h>
 #include <linux/init.h>
 #include <linux/io.h>
-#include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/clk.h>
 #include <linux/of.h>
@@ -424,9 +423,4 @@ static struct platform_driver armada_375_pinctrl_driver = {
        },
        .probe = armada_375_pinctrl_probe,
 };
-
-module_platform_driver(armada_375_pinctrl_driver);
-
-MODULE_AUTHOR("Thomas Petazzoni <thomas.petazzoni@free-electrons.com>");
-MODULE_DESCRIPTION("Marvell Armada 375 pinctrl driver");
-MODULE_LICENSE("GPL v2");
+builtin_platform_driver(armada_375_pinctrl_driver);
index e66ed239522e149339686789dd3e3d29191e8d50..de2e1538a26fc7f9a77f25a48e90f7a96a319017 100644 (file)
@@ -14,7 +14,6 @@
 #include <linux/err.h>
 #include <linux/init.h>
 #include <linux/io.h>
-#include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
@@ -435,9 +434,4 @@ static struct platform_driver armada_38x_pinctrl_driver = {
        },
        .probe = armada_38x_pinctrl_probe,
 };
-
-module_platform_driver(armada_38x_pinctrl_driver);
-
-MODULE_AUTHOR("Thomas Petazzoni <thomas.petazzoni@free-electrons.com>");
-MODULE_DESCRIPTION("Marvell Armada 38x pinctrl driver");
-MODULE_LICENSE("GPL v2");
+builtin_platform_driver(armada_38x_pinctrl_driver);
index 697c8774a4da50a6de23bc82488e91880cc9b9d8..627f57c88372a44e398808ce4df3f3b9a4513f0e 100644 (file)
@@ -14,7 +14,6 @@
 #include <linux/err.h>
 #include <linux/init.h>
 #include <linux/io.h>
-#include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
@@ -417,9 +416,4 @@ static struct platform_driver armada_39x_pinctrl_driver = {
        },
        .probe = armada_39x_pinctrl_probe,
 };
-
-module_platform_driver(armada_39x_pinctrl_driver);
-
-MODULE_AUTHOR("Thomas Petazzoni <thomas.petazzoni@free-electrons.com>");
-MODULE_DESCRIPTION("Marvell Armada 39x pinctrl driver");
-MODULE_LICENSE("GPL v2");
+builtin_platform_driver(armada_39x_pinctrl_driver);
index 61cbc138703e7dbc6bf19cd73509c66aa44b4252..b854f1ee5de579b3fb4934de30ff0bf3272d2b9c 100644 (file)
@@ -20,7 +20,6 @@
 #include <linux/err.h>
 #include <linux/init.h>
 #include <linux/io.h>
-#include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/clk.h>
 #include <linux/of.h>
@@ -650,9 +649,4 @@ static struct platform_driver armada_xp_pinctrl_driver = {
        .suspend = armada_xp_pinctrl_suspend,
        .resume = armada_xp_pinctrl_resume,
 };
-
-module_platform_driver(armada_xp_pinctrl_driver);
-
-MODULE_AUTHOR("Thomas Petazzoni <thomas.petazzoni@free-electrons.com>");
-MODULE_DESCRIPTION("Marvell Armada XP pinctrl driver");
-MODULE_LICENSE("GPL v2");
+builtin_platform_driver(armada_xp_pinctrl_driver);
index 89ae93c49f2f7cb16243039e076322761800abe6..8472f61f2bbe73a35e3410eed9a6999d15c19794 100644 (file)
@@ -12,7 +12,6 @@
 #include <linux/err.h>
 #include <linux/init.h>
 #include <linux/io.h>
-#include <linux/module.h>
 #include <linux/bitops.h>
 #include <linux/platform_device.h>
 #include <linux/clk.h>
@@ -854,24 +853,12 @@ static int dove_pinctrl_probe(struct platform_device *pdev)
        return mvebu_pinctrl_probe(pdev);
 }
 
-static int dove_pinctrl_remove(struct platform_device *pdev)
-{
-       if (!IS_ERR(clk))
-               clk_disable_unprepare(clk);
-       return 0;
-}
-
 static struct platform_driver dove_pinctrl_driver = {
        .driver = {
                .name = "dove-pinctrl",
+               .suppress_bind_attrs = true,
                .of_match_table = dove_pinctrl_of_match,
        },
        .probe = dove_pinctrl_probe,
-       .remove = dove_pinctrl_remove,
 };
-
-module_platform_driver(dove_pinctrl_driver);
-
-MODULE_AUTHOR("Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>");
-MODULE_DESCRIPTION("Marvell Dove pinctrl driver");
-MODULE_LICENSE("GPL v2");
+builtin_platform_driver(dove_pinctrl_driver);
index be12b6d569a09c6b93255eacd0fdae42899a40b8..5995a19abde5abc5e1034f2734d48400bdf6b885 100644 (file)
@@ -12,7 +12,6 @@
 #include <linux/err.h>
 #include <linux/init.h>
 #include <linux/io.h>
-#include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/clk.h>
 #include <linux/of.h>
@@ -472,9 +471,4 @@ static struct platform_driver kirkwood_pinctrl_driver = {
        },
        .probe = kirkwood_pinctrl_probe,
 };
-
-module_platform_driver(kirkwood_pinctrl_driver);
-
-MODULE_AUTHOR("Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>");
-MODULE_DESCRIPTION("Marvell Kirkwood pinctrl driver");
-MODULE_LICENSE("GPL v2");
+builtin_platform_driver(kirkwood_pinctrl_driver);
index 1bdfe770eb5cb51bae7ce47725cb951acb2b260b..e4dda12d371a473faa1c6aa48bfcc01280ec0b18 100644 (file)
@@ -11,7 +11,6 @@
  */
 
 #include <linux/platform_device.h>
-#include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/io.h>
 #include <linux/of.h>
index c2e0c16cf9b3beba971c3aaa04f5befca5cf8d22..69cb4d9f0114d0857ec99da5c763e0c42b4bb22f 100644 (file)
@@ -20,7 +20,6 @@
 #include <linux/err.h>
 #include <linux/init.h>
 #include <linux/io.h>
-#include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/clk.h>
 #include <linux/of.h>
@@ -249,9 +248,4 @@ static struct platform_driver orion_pinctrl_driver = {
        },
        .probe = orion_pinctrl_probe,
 };
-
-module_platform_driver(orion_pinctrl_driver);
-
-MODULE_AUTHOR("Thomas Petazzoni <thomas.petazzoni@free-electrons.com>");
-MODULE_DESCRIPTION("Marvell Orion pinctrl driver");
-MODULE_LICENSE("GPL v2");
+builtin_platform_driver(orion_pinctrl_driver);