From fdbde81badf09175fc1d19ef00ae685f0246ce27 Mon Sep 17 00:00:00 2001 From: Paul Gortmaker Date: Mon, 6 Feb 2017 03:03:50 -0500 Subject: pinctrl: mvebu: make bool drivers explicitly non-modular 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 Cc: linux-gpio@vger.kernel.org Signed-off-by: Paul Gortmaker Signed-off-by: Linus Walleij --- drivers/pinctrl/mvebu/pinctrl-dove.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'drivers/pinctrl/mvebu/pinctrl-dove.c') diff --git a/drivers/pinctrl/mvebu/pinctrl-dove.c b/drivers/pinctrl/mvebu/pinctrl-dove.c index 89ae93c..8472f61 100644 --- a/drivers/pinctrl/mvebu/pinctrl-dove.c +++ b/drivers/pinctrl/mvebu/pinctrl-dove.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include @@ -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 "); -MODULE_DESCRIPTION("Marvell Dove pinctrl driver"); -MODULE_LICENSE("GPL v2"); +builtin_platform_driver(dove_pinctrl_driver); -- cgit v1.1