* [PATCH v2] reset: meson: make it possible to build as a module
@ 2020-10-19 14:48 Neil Armstrong
2020-10-20 19:38 ` Martin Blumenstingl
2020-10-22 10:53 ` Philipp Zabel
0 siblings, 2 replies; 3+ messages in thread
From: Neil Armstrong @ 2020-10-19 14:48 UTC (permalink / raw)
To: p.zabel
Cc: linux-amlogic, linux-arm-kernel, linux-kernel, Neil Armstrong,
Kevin Hilman
In order to reduce the kernel Image size on multi-platform distributions,
make it possible to build the reset controller driver as a module.
This partially reverts 8290924e ("reset: meson: make it explicitly non-modular")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Tested-by: Kevin Hilman <khilman@baylibre.com>
---
Changes since v1 at [1]:
- Fix Kconfig depends
- Add missing MODULE_DEVICE_TABLE
- Add kevin's review & test tags
[1] http://lore.kernel.org/r/20201013133943.412119-1-narmstrong@baylibre.com
drivers/reset/Kconfig | 3 ++-
drivers/reset/reset-meson.c | 8 +++++++-
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig
index d9efbfd29646..9a36111cfd2c 100644
--- a/drivers/reset/Kconfig
+++ b/drivers/reset/Kconfig
@@ -94,7 +94,8 @@ config RESET_LPC18XX
This enables the reset controller driver for NXP LPC18xx/43xx SoCs.
config RESET_MESON
- bool "Meson Reset Driver" if COMPILE_TEST
+ tristate "Meson Reset Driver"
+ depends on ARCH_MESON || COMPILE_TEST
default ARCH_MESON
help
This enables the reset driver for Amlogic Meson SoCs.
diff --git a/drivers/reset/reset-meson.c b/drivers/reset/reset-meson.c
index 94d7ba88d7d2..c9bc325ad65a 100644
--- a/drivers/reset/reset-meson.c
+++ b/drivers/reset/reset-meson.c
@@ -9,6 +9,7 @@
#include <linux/init.h>
#include <linux/io.h>
#include <linux/of.h>
+#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/reset-controller.h>
#include <linux/slab.h>
@@ -104,6 +105,7 @@ static const struct of_device_id meson_reset_dt_ids[] = {
{ .compatible = "amlogic,meson-a1-reset", .data = &meson_a1_param},
{ /* sentinel */ },
};
+MODULE_DEVICE_TABLE(of, meson_reset_dt_ids);
static int meson_reset_probe(struct platform_device *pdev)
{
@@ -142,4 +144,8 @@ static struct platform_driver meson_reset_driver = {
.of_match_table = meson_reset_dt_ids,
},
};
-builtin_platform_driver(meson_reset_driver);
+module_platform_driver(meson_reset_driver);
+
+MODULE_DESCRIPTION("Amlogic Meson Reset Controller driver");
+MODULE_AUTHOR("Neil Armstrong <narmstrong@baylibre.com>");
+MODULE_LICENSE("Dual BSD/GPL");
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] reset: meson: make it possible to build as a module
2020-10-19 14:48 [PATCH v2] reset: meson: make it possible to build as a module Neil Armstrong
@ 2020-10-20 19:38 ` Martin Blumenstingl
2020-10-22 10:53 ` Philipp Zabel
1 sibling, 0 replies; 3+ messages in thread
From: Martin Blumenstingl @ 2020-10-20 19:38 UTC (permalink / raw)
To: Neil Armstrong
Cc: p.zabel, linux-amlogic, Kevin Hilman, linux-kernel, linux-arm-kernel
On Mon, Oct 19, 2020 at 4:49 PM Neil Armstrong <narmstrong@baylibre.com> wrote:
>
> In order to reduce the kernel Image size on multi-platform distributions,
> make it possible to build the reset controller driver as a module.
>
> This partially reverts 8290924e ("reset: meson: make it explicitly non-modular")
>
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> Reviewed-by: Kevin Hilman <khilman@baylibre.com>
> Tested-by: Kevin Hilman <khilman@baylibre.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] reset: meson: make it possible to build as a module
2020-10-19 14:48 [PATCH v2] reset: meson: make it possible to build as a module Neil Armstrong
2020-10-20 19:38 ` Martin Blumenstingl
@ 2020-10-22 10:53 ` Philipp Zabel
1 sibling, 0 replies; 3+ messages in thread
From: Philipp Zabel @ 2020-10-22 10:53 UTC (permalink / raw)
To: Neil Armstrong
Cc: linux-amlogic, linux-arm-kernel, linux-kernel, Kevin Hilman
Hi Neil,
thank you for the patch.
On Mon, 2020-10-19 at 16:48 +0200, Neil Armstrong wrote:
> In order to reduce the kernel Image size on multi-platform distributions,
> make it possible to build the reset controller driver as a module.
>
> This partially reverts 8290924e ("reset: meson: make it explicitly non-modular")
I've changed this to:
This partially reverts commit 8290924e6878 ("reset: meson: make it
explicitly non-modular").
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> Reviewed-by: Kevin Hilman <khilman@baylibre.com>
> Tested-by: Kevin Hilman <khilman@baylibre.com>
Applied to reset/next with Martin's R-b.
regards
Philipp
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-10-22 10:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-19 14:48 [PATCH v2] reset: meson: make it possible to build as a module Neil Armstrong
2020-10-20 19:38 ` Martin Blumenstingl
2020-10-22 10:53 ` Philipp Zabel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).