* [PATCH] cxl: make base more explicitly non-modular
@ 2016-07-03 20:31 Paul Gortmaker
2016-07-04 1:49 ` Ian Munsie
2016-07-11 10:19 ` Michael Ellerman
0 siblings, 2 replies; 3+ messages in thread
From: Paul Gortmaker @ 2016-07-03 20:31 UTC (permalink / raw)
To: linux-kernel; +Cc: Paul Gortmaker, Ian Munsie, Michael Neuling, linuxppc-dev
The Kconfig/Makefile currently controlling compilation of this code is:
drivers/misc/cxl/Kconfig:config CXL_BASE
drivers/misc/cxl/Kconfig: bool
drivers/misc/cxl/Makefile:obj-$(CONFIG_CXL_BASE) += base.o
...meaning that it currently is not being built as a module by anyone.
Lets convert the one module_init into device_initcall so that
when reading the driver it more clear that it is builtin-only.
Since module_init translates to device_initcall in the non-modular
case, the init ordering remains unchanged with this commit.
We don't replace module.h with init.h since the file is doing
other modular stuff (module_get/put) even though it is built-in.
Cc: Ian Munsie <imunsie@au1.ibm.com>
Cc: Michael Neuling <mikey@neuling.org>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
drivers/misc/cxl/base.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/misc/cxl/base.c b/drivers/misc/cxl/base.c
index 9b90ec6c07cd..e6f49aca0035 100644
--- a/drivers/misc/cxl/base.c
+++ b/drivers/misc/cxl/base.c
@@ -114,5 +114,4 @@ static int __init cxl_base_init(void)
pr_devel("Found %d cxl device(s)\n", count);
return 0;
}
-
-module_init(cxl_base_init);
+device_initcall(cxl_base_init);
--
2.8.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] cxl: make base more explicitly non-modular
2016-07-03 20:31 [PATCH] cxl: make base more explicitly non-modular Paul Gortmaker
@ 2016-07-04 1:49 ` Ian Munsie
2016-07-11 10:19 ` Michael Ellerman
1 sibling, 0 replies; 3+ messages in thread
From: Ian Munsie @ 2016-07-04 1:49 UTC (permalink / raw)
To: Paul Gortmaker; +Cc: linux-kernel, Michael Neuling, linuxppc-dev
Acked-by: Ian Munsie <imunsie@au1.ibm.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: cxl: make base more explicitly non-modular
2016-07-03 20:31 [PATCH] cxl: make base more explicitly non-modular Paul Gortmaker
2016-07-04 1:49 ` Ian Munsie
@ 2016-07-11 10:19 ` Michael Ellerman
1 sibling, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2016-07-11 10:19 UTC (permalink / raw)
To: Paul Gortmaker, linux-kernel
Cc: Paul Gortmaker, Michael Neuling, linuxppc-dev, Ian Munsie
On Sun, 2016-03-07 at 20:31:53 UTC, Paul Gortmaker wrote:
> The Kconfig/Makefile currently controlling compilation of this code is:
>
> drivers/misc/cxl/Kconfig:config CXL_BASE
> drivers/misc/cxl/Kconfig: bool
>
> drivers/misc/cxl/Makefile:obj-$(CONFIG_CXL_BASE) += base.o
>
> ...meaning that it currently is not being built as a module by anyone.
>
> Lets convert the one module_init into device_initcall so that
> when reading the driver it more clear that it is builtin-only.
>
> Since module_init translates to device_initcall in the non-modular
> case, the init ordering remains unchanged with this commit.
>
> We don't replace module.h with init.h since the file is doing
> other modular stuff (module_get/put) even though it is built-in.
>
> Cc: Ian Munsie <imunsie@au1.ibm.com>
> Cc: Michael Neuling <mikey@neuling.org>
> Cc: linuxppc-dev@lists.ozlabs.org
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> Acked-by: Ian Munsie <imunsie@au1.ibm.com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/e00878be3f414a99234b3c9613
cheers
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-07-11 10:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-03 20:31 [PATCH] cxl: make base more explicitly non-modular Paul Gortmaker
2016-07-04 1:49 ` Ian Munsie
2016-07-11 10:19 ` Michael Ellerman
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).