Skip to content

Commit

Permalink
cxl: make base more explicitly non-modular
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Michael Neuling <[email protected]>
Cc: [email protected]
Signed-off-by: Paul Gortmaker <[email protected]>
Acked-by: Ian Munsie <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
  • Loading branch information
Paul Gortmaker authored and mpe committed Jul 8, 2016
1 parent 6e0c50f commit e00878b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/misc/cxl/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

0 comments on commit e00878b

Please sign in to comment.