* [PATCH 0/4] reset: de-modularize the remaining reset drivers
@ 2017-02-08 0:18 ` Paul Gortmaker
0 siblings, 0 replies; 13+ messages in thread
From: Paul Gortmaker @ 2017-02-08 0:18 UTC (permalink / raw)
To: linux-kernel
Cc: Paul Gortmaker, Alban Bedel, Carlo Caione, Damien Horsley,
Kevin Hilman, linux-amlogic, linux-oxnas, Neil Armstrong,
Philipp Zabel
Recently, a new reset driver was added that used module stuff in a
driver that was clearly non-modular[1]. With that in mind, it is
probably wise to get the remaining patches I have locally for the
existing reset drivers out the door, so we don't get any more
future instances of a new driver copying the old error once again.
Paul.
---
[1] https://lkml.kernel.org/r/CAP=VYLqhAEKAdnO7skBU7V+NxbQqXs_UbOO0J1hYHmCq3aKQow@mail.gmail.com
Cc: Alban Bedel <albeu@free.fr>
Cc: Carlo Caione <carlo@caione.org>
Cc: Damien Horsley <Damien.Horsley@imgtec.com>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: linux-amlogic@lists.infradead.org
Cc: linux-oxnas@lists.tuxfamily.org
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Paul Gortmaker (4):
reset: ath79: make it explicitly non-modular
reset: pistachio: make it explicitly non-modular
reset: meson: make it explicitly non-modular
reset: oxnas: make it explicitly non-modular
drivers/reset/reset-ath79.c | 27 ++++++++-------------------
drivers/reset/reset-meson.c | 12 ++++--------
drivers/reset/reset-oxnas.c | 6 ++----
drivers/reset/reset-pistachio.c | 9 ++-------
4 files changed, 16 insertions(+), 38 deletions(-)
--
2.11.0
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 0/4] reset: de-modularize the remaining reset drivers
@ 2017-02-08 0:18 ` Paul Gortmaker
0 siblings, 0 replies; 13+ messages in thread
From: Paul Gortmaker @ 2017-02-08 0:18 UTC (permalink / raw)
To: linus-amlogic
Recently, a new reset driver was added that used module stuff in a
driver that was clearly non-modular[1]. With that in mind, it is
probably wise to get the remaining patches I have locally for the
existing reset drivers out the door, so we don't get any more
future instances of a new driver copying the old error once again.
Paul.
---
[1] https://lkml.kernel.org/r/CAP=VYLqhAEKAdnO7skBU7V+NxbQqXs_UbOO0J1hYHmCq3aKQow at mail.gmail.com
Cc: Alban Bedel <albeu@free.fr>
Cc: Carlo Caione <carlo@caione.org>
Cc: Damien Horsley <Damien.Horsley@imgtec.com>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: linux-amlogic at lists.infradead.org
Cc: linux-oxnas at lists.tuxfamily.org
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Paul Gortmaker (4):
reset: ath79: make it explicitly non-modular
reset: pistachio: make it explicitly non-modular
reset: meson: make it explicitly non-modular
reset: oxnas: make it explicitly non-modular
drivers/reset/reset-ath79.c | 27 ++++++++-------------------
drivers/reset/reset-meson.c | 12 ++++--------
drivers/reset/reset-oxnas.c | 6 ++----
drivers/reset/reset-pistachio.c | 9 ++-------
4 files changed, 16 insertions(+), 38 deletions(-)
--
2.11.0
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 1/4] reset: ath79: make it explicitly non-modular
2017-02-08 0:18 ` Paul Gortmaker
(?)
@ 2017-02-08 0:18 ` Paul Gortmaker
2017-02-09 9:03 ` Alban
-1 siblings, 1 reply; 13+ messages in thread
From: Paul Gortmaker @ 2017-02-08 0:18 UTC (permalink / raw)
To: linux-kernel; +Cc: Paul Gortmaker, Philipp Zabel, Alban Bedel
The Kconfig currently controlling compilation of this code is:
drivers/reset/Kconfig:config RESET_ATH79
drivers/reset/Kconfig: bool "AR71xx Reset Driver" if COMPILE_TEST
...meaning that it currently is not being built as a module by anyone.
Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.
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.
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
was (or is now) contained at the top of the file in the comments.
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Alban Bedel <albeu@free.fr>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
drivers/reset/reset-ath79.c | 27 ++++++++-------------------
1 file changed, 8 insertions(+), 19 deletions(-)
diff --git a/drivers/reset/reset-ath79.c b/drivers/reset/reset-ath79.c
index 6b97631f5489..2674880e5492 100644
--- a/drivers/reset/reset-ath79.c
+++ b/drivers/reset/reset-ath79.c
@@ -1,4 +1,7 @@
/*
+ * AR71xx Reset Controller Driver
+ * Author: Alban Bedel
+ *
* Copyright (C) 2015 Alban Bedel <albeu@free.fr>
*
* This program is free software; you can redistribute it and/or modify
@@ -13,7 +16,7 @@
*/
#include <linux/io.h>
-#include <linux/module.h>
+#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/reset-controller.h>
#include <linux/reboot.h>
@@ -127,31 +130,17 @@ static int ath79_reset_probe(struct platform_device *pdev)
return 0;
}
-static int ath79_reset_remove(struct platform_device *pdev)
-{
- struct ath79_reset *ath79_reset = platform_get_drvdata(pdev);
-
- unregister_restart_handler(&ath79_reset->restart_nb);
-
- return 0;
-}
-
static const struct of_device_id ath79_reset_dt_ids[] = {
{ .compatible = "qca,ar7100-reset", },
{ },
};
-MODULE_DEVICE_TABLE(of, ath79_reset_dt_ids);
static struct platform_driver ath79_reset_driver = {
.probe = ath79_reset_probe,
- .remove = ath79_reset_remove,
.driver = {
- .name = "ath79-reset",
- .of_match_table = ath79_reset_dt_ids,
+ .name = "ath79-reset",
+ .of_match_table = ath79_reset_dt_ids,
+ .suppress_bind_attrs = true,
},
};
-module_platform_driver(ath79_reset_driver);
-
-MODULE_AUTHOR("Alban Bedel <albeu@free.fr>");
-MODULE_DESCRIPTION("AR71xx Reset Controller Driver");
-MODULE_LICENSE("GPL");
+builtin_platform_driver(ath79_reset_driver);
--
2.11.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 2/4] reset: pistachio: make it explicitly non-modular
2017-02-08 0:18 ` Paul Gortmaker
(?)
(?)
@ 2017-02-08 0:18 ` Paul Gortmaker
-1 siblings, 0 replies; 13+ messages in thread
From: Paul Gortmaker @ 2017-02-08 0:18 UTC (permalink / raw)
To: linux-kernel; +Cc: Paul Gortmaker, Philipp Zabel, Damien Horsley
The Kconfig currently controlling compilation of this code is:
drivers/reset/Kconfig:config RESET_PISTACHIO
drivers/reset/Kconfig: bool "Pistachio Reset Driver" if COMPILE_TEST
...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.
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Damien Horsley <Damien.Horsley@imgtec.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
drivers/reset/reset-pistachio.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/reset/reset-pistachio.c b/drivers/reset/reset-pistachio.c
index bbc4c06dd33b..11d651b44e81 100644
--- a/drivers/reset/reset-pistachio.c
+++ b/drivers/reset/reset-pistachio.c
@@ -10,7 +10,7 @@
* version 2, as published by the Free Software Foundation.
*/
-#include <linux/module.h>
+#include <linux/init.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
@@ -128,7 +128,6 @@ static const struct of_device_id pistachio_reset_dt_ids[] = {
{ .compatible = "img,pistachio-reset", },
{ /* sentinel */ },
};
-MODULE_DEVICE_TABLE(of, pistachio_reset_dt_ids);
static struct platform_driver pistachio_reset_driver = {
.probe = pistachio_reset_probe,
@@ -137,8 +136,4 @@ static struct platform_driver pistachio_reset_driver = {
.of_match_table = pistachio_reset_dt_ids,
},
};
-module_platform_driver(pistachio_reset_driver);
-
-MODULE_AUTHOR("Damien Horsley <Damien.Horsley@imgtec.com>");
-MODULE_DESCRIPTION("Pistacho Reset Controller Driver");
-MODULE_LICENSE("GPL v2");
+builtin_platform_driver(pistachio_reset_driver);
--
2.11.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 3/4] reset: meson: make it explicitly non-modular
2017-02-08 0:18 ` Paul Gortmaker
@ 2017-02-08 0:18 ` Paul Gortmaker
-1 siblings, 0 replies; 13+ messages in thread
From: Paul Gortmaker @ 2017-02-08 0:18 UTC (permalink / raw)
To: linux-kernel
Cc: Paul Gortmaker, Philipp Zabel, Carlo Caione, Kevin Hilman,
linux-amlogic, Neil Armstrong
The Kconfig currently controlling compilation of this code is:
arch/arm/mach-meson/Kconfig:menuconfig ARCH_MESON
arch/arm/mach-meson/Kconfig: bool "Amlogic Meson SoCs"
arch/arm64/Kconfig.platforms:config ARCH_MESON
arch/arm64/Kconfig.platforms: bool "Amlogic Platforms"
...meaning that it currently is not being built as a module by anyone.
Lets remove the modular code that is essentially orphaned, 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
was (or is now) contained at the top of the file in the comments.
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: linux-amlogic@lists.infradead.org
Cc: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
drivers/reset/reset-meson.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/reset/reset-meson.c b/drivers/reset/reset-meson.c
index c32f11a30c5f..a8b915eb8b58 100644
--- a/drivers/reset/reset-meson.c
+++ b/drivers/reset/reset-meson.c
@@ -1,4 +1,6 @@
/*
+ * Amlogic Meson Reset Controller driver
+ *
* This file is provided under a dual BSD/GPLv2 license. When using or
* redistributing this file, you may do so under either license.
*
@@ -53,7 +55,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <linux/err.h>
-#include <linux/module.h>
+#include <linux/init.h>
#include <linux/io.h>
#include <linux/of.h>
#include <linux/platform_device.h>
@@ -95,7 +97,6 @@ static const struct of_device_id meson_reset_dt_ids[] = {
{ .compatible = "amlogic,meson-gxbb-reset", },
{ /* sentinel */ },
};
-MODULE_DEVICE_TABLE(of, meson_reset_dt_ids);
static int meson_reset_probe(struct platform_device *pdev)
{
@@ -128,9 +129,4 @@ static struct platform_driver meson_reset_driver = {
.of_match_table = meson_reset_dt_ids,
},
};
-
-module_platform_driver(meson_reset_driver);
-
-MODULE_AUTHOR("Neil Armstrong <narmstrong@baylibre.com>");
-MODULE_DESCRIPTION("Amlogic Meson Reset Controller driver");
-MODULE_LICENSE("Dual BSD/GPL");
+builtin_platform_driver(meson_reset_driver);
--
2.11.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 3/4] reset: meson: make it explicitly non-modular
@ 2017-02-08 0:18 ` Paul Gortmaker
0 siblings, 0 replies; 13+ messages in thread
From: Paul Gortmaker @ 2017-02-08 0:18 UTC (permalink / raw)
To: linus-amlogic
The Kconfig currently controlling compilation of this code is:
arch/arm/mach-meson/Kconfig:menuconfig ARCH_MESON
arch/arm/mach-meson/Kconfig: bool "Amlogic Meson SoCs"
arch/arm64/Kconfig.platforms:config ARCH_MESON
arch/arm64/Kconfig.platforms: bool "Amlogic Platforms"
...meaning that it currently is not being built as a module by anyone.
Lets remove the modular code that is essentially orphaned, 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
was (or is now) contained at the top of the file in the comments.
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: linux-amlogic at lists.infradead.org
Cc: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
drivers/reset/reset-meson.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/reset/reset-meson.c b/drivers/reset/reset-meson.c
index c32f11a30c5f..a8b915eb8b58 100644
--- a/drivers/reset/reset-meson.c
+++ b/drivers/reset/reset-meson.c
@@ -1,4 +1,6 @@
/*
+ * Amlogic Meson Reset Controller driver
+ *
* This file is provided under a dual BSD/GPLv2 license. When using or
* redistributing this file, you may do so under either license.
*
@@ -53,7 +55,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <linux/err.h>
-#include <linux/module.h>
+#include <linux/init.h>
#include <linux/io.h>
#include <linux/of.h>
#include <linux/platform_device.h>
@@ -95,7 +97,6 @@ static const struct of_device_id meson_reset_dt_ids[] = {
{ .compatible = "amlogic,meson-gxbb-reset", },
{ /* sentinel */ },
};
-MODULE_DEVICE_TABLE(of, meson_reset_dt_ids);
static int meson_reset_probe(struct platform_device *pdev)
{
@@ -128,9 +129,4 @@ static struct platform_driver meson_reset_driver = {
.of_match_table = meson_reset_dt_ids,
},
};
-
-module_platform_driver(meson_reset_driver);
-
-MODULE_AUTHOR("Neil Armstrong <narmstrong@baylibre.com>");
-MODULE_DESCRIPTION("Amlogic Meson Reset Controller driver");
-MODULE_LICENSE("Dual BSD/GPL");
+builtin_platform_driver(meson_reset_driver);
--
2.11.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 4/4] reset: oxnas: make it explicitly non-modular
2017-02-08 0:18 ` Paul Gortmaker
` (3 preceding siblings ...)
(?)
@ 2017-02-08 0:18 ` Paul Gortmaker
2017-02-08 8:44 ` Neil Armstrong
-1 siblings, 1 reply; 13+ messages in thread
From: Paul Gortmaker @ 2017-02-08 0:18 UTC (permalink / raw)
To: linux-kernel; +Cc: Paul Gortmaker, Philipp Zabel, Neil Armstrong, linux-oxnas
The Kconfig currently controlling compilation of this code is:
drivers/reset/Kconfig:config RESET_OXNAS
drivers/reset/Kconfig: bool
...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.
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: linux-oxnas@lists.tuxfamily.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
drivers/reset/reset-oxnas.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/reset/reset-oxnas.c b/drivers/reset/reset-oxnas.c
index 0d9036dea010..cf5b9742b86e 100644
--- a/drivers/reset/reset-oxnas.c
+++ b/drivers/reset/reset-oxnas.c
@@ -18,7 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <linux/err.h>
-#include <linux/module.h>
+#include <linux/init.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/reset-controller.h>
@@ -83,7 +83,6 @@ static const struct of_device_id oxnas_reset_dt_ids[] = {
{ .compatible = "oxsemi,ox820-reset", },
{ /* sentinel */ },
};
-MODULE_DEVICE_TABLE(of, oxnas_reset_dt_ids);
static int oxnas_reset_probe(struct platform_device *pdev)
{
@@ -123,5 +122,4 @@ static struct platform_driver oxnas_reset_driver = {
.of_match_table = oxnas_reset_dt_ids,
},
};
-
-module_platform_driver(oxnas_reset_driver);
+builtin_platform_driver(oxnas_reset_driver);
--
2.11.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH 3/4] reset: meson: make it explicitly non-modular
2017-02-08 0:18 ` Paul Gortmaker
@ 2017-02-08 8:43 ` Neil Armstrong
-1 siblings, 0 replies; 13+ messages in thread
From: Neil Armstrong @ 2017-02-08 8:43 UTC (permalink / raw)
To: Paul Gortmaker, linux-kernel
Cc: Philipp Zabel, Carlo Caione, Kevin Hilman, linux-amlogic
On 02/08/2017 01:18 AM, Paul Gortmaker wrote:
> The Kconfig currently controlling compilation of this code is:
>
> arch/arm/mach-meson/Kconfig:menuconfig ARCH_MESON
> arch/arm/mach-meson/Kconfig: bool "Amlogic Meson SoCs"
>
> arch/arm64/Kconfig.platforms:config ARCH_MESON
> arch/arm64/Kconfig.platforms: bool "Amlogic Platforms"
>
> ...meaning that it currently is not being built as a module by anyone.
>
> Lets remove the modular code that is essentially orphaned, 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
> was (or is now) contained at the top of the file in the comments.
>
> Cc: Philipp Zabel <p.zabel@pengutronix.de>
> Cc: Carlo Caione <carlo@caione.org>
> Cc: Kevin Hilman <khilman@baylibre.com>
> Cc: linux-amlogic@lists.infradead.org
> Cc: Neil Armstrong <narmstrong@baylibre.com>
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> ---
> drivers/reset/reset-meson.c | 12 ++++--------
> 1 file changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/reset/reset-meson.c b/drivers/reset/reset-meson.c
> index c32f11a30c5f..a8b915eb8b58 100644
> --- a/drivers/reset/reset-meson.c
> +++ b/drivers/reset/reset-meson.c
> @@ -1,4 +1,6 @@
> /*
> + * Amlogic Meson Reset Controller driver
> + *
> * This file is provided under a dual BSD/GPLv2 license. When using or
> * redistributing this file, you may do so under either license.
> *
> @@ -53,7 +55,7 @@
> * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> */
> #include <linux/err.h>
> -#include <linux/module.h>
> +#include <linux/init.h>
> #include <linux/io.h>
> #include <linux/of.h>
> #include <linux/platform_device.h>
> @@ -95,7 +97,6 @@ static const struct of_device_id meson_reset_dt_ids[] = {
> { .compatible = "amlogic,meson-gxbb-reset", },
> { /* sentinel */ },
> };
> -MODULE_DEVICE_TABLE(of, meson_reset_dt_ids);
>
> static int meson_reset_probe(struct platform_device *pdev)
> {
> @@ -128,9 +129,4 @@ static struct platform_driver meson_reset_driver = {
> .of_match_table = meson_reset_dt_ids,
> },
> };
> -
> -module_platform_driver(meson_reset_driver);
> -
> -MODULE_AUTHOR("Neil Armstrong <narmstrong@baylibre.com>");
> -MODULE_DESCRIPTION("Amlogic Meson Reset Controller driver");
> -MODULE_LICENSE("Dual BSD/GPL");
> +builtin_platform_driver(meson_reset_driver);
>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 3/4] reset: meson: make it explicitly non-modular
@ 2017-02-08 8:43 ` Neil Armstrong
0 siblings, 0 replies; 13+ messages in thread
From: Neil Armstrong @ 2017-02-08 8:43 UTC (permalink / raw)
To: linus-amlogic
On 02/08/2017 01:18 AM, Paul Gortmaker wrote:
> The Kconfig currently controlling compilation of this code is:
>
> arch/arm/mach-meson/Kconfig:menuconfig ARCH_MESON
> arch/arm/mach-meson/Kconfig: bool "Amlogic Meson SoCs"
>
> arch/arm64/Kconfig.platforms:config ARCH_MESON
> arch/arm64/Kconfig.platforms: bool "Amlogic Platforms"
>
> ...meaning that it currently is not being built as a module by anyone.
>
> Lets remove the modular code that is essentially orphaned, 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
> was (or is now) contained at the top of the file in the comments.
>
> Cc: Philipp Zabel <p.zabel@pengutronix.de>
> Cc: Carlo Caione <carlo@caione.org>
> Cc: Kevin Hilman <khilman@baylibre.com>
> Cc: linux-amlogic at lists.infradead.org
> Cc: Neil Armstrong <narmstrong@baylibre.com>
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> ---
> drivers/reset/reset-meson.c | 12 ++++--------
> 1 file changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/reset/reset-meson.c b/drivers/reset/reset-meson.c
> index c32f11a30c5f..a8b915eb8b58 100644
> --- a/drivers/reset/reset-meson.c
> +++ b/drivers/reset/reset-meson.c
> @@ -1,4 +1,6 @@
> /*
> + * Amlogic Meson Reset Controller driver
> + *
> * This file is provided under a dual BSD/GPLv2 license. When using or
> * redistributing this file, you may do so under either license.
> *
> @@ -53,7 +55,7 @@
> * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> */
> #include <linux/err.h>
> -#include <linux/module.h>
> +#include <linux/init.h>
> #include <linux/io.h>
> #include <linux/of.h>
> #include <linux/platform_device.h>
> @@ -95,7 +97,6 @@ static const struct of_device_id meson_reset_dt_ids[] = {
> { .compatible = "amlogic,meson-gxbb-reset", },
> { /* sentinel */ },
> };
> -MODULE_DEVICE_TABLE(of, meson_reset_dt_ids);
>
> static int meson_reset_probe(struct platform_device *pdev)
> {
> @@ -128,9 +129,4 @@ static struct platform_driver meson_reset_driver = {
> .of_match_table = meson_reset_dt_ids,
> },
> };
> -
> -module_platform_driver(meson_reset_driver);
> -
> -MODULE_AUTHOR("Neil Armstrong <narmstrong@baylibre.com>");
> -MODULE_DESCRIPTION("Amlogic Meson Reset Controller driver");
> -MODULE_LICENSE("Dual BSD/GPL");
> +builtin_platform_driver(meson_reset_driver);
>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 4/4] reset: oxnas: make it explicitly non-modular
2017-02-08 0:18 ` [PATCH 4/4] reset: oxnas: " Paul Gortmaker
@ 2017-02-08 8:44 ` Neil Armstrong
0 siblings, 0 replies; 13+ messages in thread
From: Neil Armstrong @ 2017-02-08 8:44 UTC (permalink / raw)
To: Paul Gortmaker, linux-kernel; +Cc: Philipp Zabel, linux-oxnas
On 02/08/2017 01:18 AM, Paul Gortmaker wrote:
> The Kconfig currently controlling compilation of this code is:
>
> drivers/reset/Kconfig:config RESET_OXNAS
> drivers/reset/Kconfig: bool
>
> ...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.
>
> Cc: Philipp Zabel <p.zabel@pengutronix.de>
> Cc: Neil Armstrong <narmstrong@baylibre.com>
> Cc: linux-oxnas@lists.tuxfamily.org
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> ---
> drivers/reset/reset-oxnas.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/reset/reset-oxnas.c b/drivers/reset/reset-oxnas.c
> index 0d9036dea010..cf5b9742b86e 100644
> --- a/drivers/reset/reset-oxnas.c
> +++ b/drivers/reset/reset-oxnas.c
> @@ -18,7 +18,7 @@
> * along with this program. If not, see <http://www.gnu.org/licenses/>.
> */
> #include <linux/err.h>
> -#include <linux/module.h>
> +#include <linux/init.h>
> #include <linux/of.h>
> #include <linux/platform_device.h>
> #include <linux/reset-controller.h>
> @@ -83,7 +83,6 @@ static const struct of_device_id oxnas_reset_dt_ids[] = {
> { .compatible = "oxsemi,ox820-reset", },
> { /* sentinel */ },
> };
> -MODULE_DEVICE_TABLE(of, oxnas_reset_dt_ids);
>
> static int oxnas_reset_probe(struct platform_device *pdev)
> {
> @@ -123,5 +122,4 @@ static struct platform_driver oxnas_reset_driver = {
> .of_match_table = oxnas_reset_dt_ids,
> },
> };
> -
> -module_platform_driver(oxnas_reset_driver);
> +builtin_platform_driver(oxnas_reset_driver);
>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 0/4] reset: de-modularize the remaining reset drivers
2017-02-08 0:18 ` Paul Gortmaker
@ 2017-02-08 10:43 ` Philipp Zabel
-1 siblings, 0 replies; 13+ messages in thread
From: Philipp Zabel @ 2017-02-08 10:43 UTC (permalink / raw)
To: Paul Gortmaker
Cc: linux-kernel, Alban Bedel, Carlo Caione, Damien Horsley,
Kevin Hilman, linux-amlogic, linux-oxnas, Neil Armstrong
Hi Paul,
On Tue, 2017-02-07 at 19:18 -0500, Paul Gortmaker wrote:
> Recently, a new reset driver was added that used module stuff in a
> driver that was clearly non-modular[1]. With that in mind, it is
> probably wise to get the remaining patches I have locally for the
> existing reset drivers out the door, so we don't get any more
> future instances of a new driver copying the old error once again.
Applied, much appreciated.
I'll wait a bit for the remaining authors' Acked-by:s and then push them
out.
regards
Philipp
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 0/4] reset: de-modularize the remaining reset drivers
@ 2017-02-08 10:43 ` Philipp Zabel
0 siblings, 0 replies; 13+ messages in thread
From: Philipp Zabel @ 2017-02-08 10:43 UTC (permalink / raw)
To: linus-amlogic
Hi Paul,
On Tue, 2017-02-07 at 19:18 -0500, Paul Gortmaker wrote:
> Recently, a new reset driver was added that used module stuff in a
> driver that was clearly non-modular[1]. With that in mind, it is
> probably wise to get the remaining patches I have locally for the
> existing reset drivers out the door, so we don't get any more
> future instances of a new driver copying the old error once again.
Applied, much appreciated.
I'll wait a bit for the remaining authors' Acked-by:s and then push them
out.
regards
Philipp
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/4] reset: ath79: make it explicitly non-modular
2017-02-08 0:18 ` [PATCH 1/4] reset: ath79: make it explicitly non-modular Paul Gortmaker
@ 2017-02-09 9:03 ` Alban
0 siblings, 0 replies; 13+ messages in thread
From: Alban @ 2017-02-09 9:03 UTC (permalink / raw)
To: Paul Gortmaker; +Cc: Alban, linux-kernel, Philipp Zabel
[-- Attachment #1: Type: text/plain, Size: 1238 bytes --]
On Tue, 7 Feb 2017 19:18:44 -0500
Paul Gortmaker <paul.gortmaker@windriver.com> wrote:
> The Kconfig currently controlling compilation of this code is:
>
> drivers/reset/Kconfig:config RESET_ATH79
> drivers/reset/Kconfig: bool "AR71xx Reset Driver" if COMPILE_TEST
>
> ...meaning that it currently is not being built as a module by anyone.
>
> Lets remove the modular code that is essentially orphaned, so that
> when reading the driver there is no doubt it is builtin-only.
>
> 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.
>
> 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
> was (or is now) contained at the top of the file in the comments.
>
> Cc: Philipp Zabel <p.zabel@pengutronix.de>
> Cc: Alban Bedel <albeu@free.fr>
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Alban Bedel <albeu@free.fr>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2017-02-09 9:07 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-08 0:18 [PATCH 0/4] reset: de-modularize the remaining reset drivers Paul Gortmaker
2017-02-08 0:18 ` Paul Gortmaker
2017-02-08 0:18 ` [PATCH 1/4] reset: ath79: make it explicitly non-modular Paul Gortmaker
2017-02-09 9:03 ` Alban
2017-02-08 0:18 ` [PATCH 2/4] reset: pistachio: " Paul Gortmaker
2017-02-08 0:18 ` [PATCH 3/4] reset: meson: " Paul Gortmaker
2017-02-08 0:18 ` Paul Gortmaker
2017-02-08 8:43 ` Neil Armstrong
2017-02-08 8:43 ` Neil Armstrong
2017-02-08 0:18 ` [PATCH 4/4] reset: oxnas: " Paul Gortmaker
2017-02-08 8:44 ` Neil Armstrong
2017-02-08 10:43 ` [PATCH 0/4] reset: de-modularize the remaining reset drivers Philipp Zabel
2017-02-08 10:43 ` Philipp Zabel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.