pinctrl: sunxi: make sun5i explicitly non-modular
Subsystems (3)
PATCH 1/1 pinctrl: sunxi: make sun5i explicitly non-modular
We had all these corrected in commit 0c8c6ba00cbf ("pinctrl: sunxi:
make bool drivers explicitly non-modular") but this new one recently crept in.
The Kconfig currently controlling compilation of this code is:
drivers/pinctrl/sunxi/Kconfig:config PINCTRL_SUN5I drivers/pinctrl/sunxi/Kconfig: def_bool MACH_SUN5I
...meaning that it currently is not being built as a module by anyone.
Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only.
Since module_platform_driver() uses the same init level priority as builtin_platform_driver() the init ordering remains unchanged with this commit.
Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.
We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments.
--- drivers/pinctrl/sunxi/pinctrl-sun5i.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)
drivers/pinctrl/sunxi/pinctrl-sun5i.c +3 -8
@@ -4,12 +4,12 @@* Copyright (C) 2014-2016 Maxime Ripard <[email protected]> * Copyright (C) 2016 Mylene Josserand <[email protected]> * -g * This file is licensed under the terms of the GNU General Public +* This file is licensed under the terms of the GNU General Public * License version 2. This program is licensed "as is" without any * warranty of any kind, whether express or implied. */ -#include <linux/module.h> +#include <linux/init.h> #include <linux/platform_device.h> #include <linux/of.h> #include <linux/of_device.h>
@@ -740,7 +740,6 @@ static const struct of_device_id sun5i_pinctrl_match[] = { }, { }, }; -MODULE_DEVICE_TABLE (of, sun5i_pinctrl_match);static struct platform_driver sun5i_pinctrl_driver = { .probe = sun5i_pinctrl_probe,
@@ -749,8 +748,4 @@ static struct platform_driver sun5i_pinctrl_driver = { .of_match_table = sun5i_pinctrl_match, }, }; -module_platform_driver (sun5i_pinctrl_driver); - -MODULE_AUTHOR ("Maxime Ripard <[email protected]" ); -MODULE_DESCRIPTION ("Allwinner sun5i pinctrl driver" ); -MODULE_LICENSE ("GPL" ); +builtin_platform_driver (sun5i_pinctrl_driver);
Signature · 1 line
2.11.0
Quoted 20 lines · Paul Gortmaker
We had all these corrected in commit
0c8c6ba00cbf("pinctrl: sunxi:
make bool drivers explicitly non-modular") but this new one recently crept in.The
Kconfigcurrently controlling compilation of this code is:drivers/pinctrl/sunxi/Kconfig:config
PINCTRL_SUN5Idrivers/pinctrl/sunxi/Kconfig:def_boolMACH_SUN5I...meaning that it currently is not being built as a module by anyone.
Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only.
Since
module_platform_driver()uses the same init level priority asbuiltin_platform_driver()the init ordering remains unchanged with this commit.Also note that
MODULE_DEVICE_TABLEis a no-op for non-modular code.
Quoted 8 lines
We also delete the
MODULE_LICENSEtag etc. since all that information is already contained at the top of the file in the comments.Cc Linus Walleij <[email protected]>Cc Maxime Ripard <[email protected]>Cc Chen-Yu Tsai <[email protected]>Signed-off-by Paul Gortmaker <[email protected]>
Quoted 20 lines · Paul Gortmaker
We had all these corrected in commit
0c8c6ba00cbf("pinctrl: sunxi:
make bool drivers explicitly non-modular") but this new one recently crept in.The
Kconfigcurrently controlling compilation of this code is:drivers/pinctrl/sunxi/Kconfig:config
PINCTRL_SUN5Idrivers/pinctrl/sunxi/Kconfig:def_boolMACH_SUN5I...meaning that it currently is not being built as a module by anyone.
Lets remove the couple traces of modular infrastructure use, so that when reading the driver there is no doubt it is builtin-only.
Since
module_platform_driver()uses the same init level priority asbuiltin_platform_driver()the init ordering remains unchanged with this commit.Also note that
MODULE_DEVICE_TABLEis a no-op for non-modular code.
Quoted 8 lines
We also delete the
MODULE_LICENSEtag etc. since all that information is already contained at the top of the file in the comments.Cc Linus Walleij <[email protected]>Cc Maxime Ripard <[email protected]>Cc Chen-Yu Tsai <[email protected]>Signed-off-by Paul Gortmaker <[email protected]>
Patch applied.
Yours,
Linus Walleij