diff options
author | Masami Hiramatsu <mhiramat@kernel.org> | 2020-05-28 16:52:16 +0200 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2020-06-02 18:26:14 +0200 |
commit | 2f56f84511367ce5ffd4a1c88dcd770ef049ea96 (patch) | |
tree | 7d330c1ae60bdd1af58aee7bcedd3a38da89d07d /lib/test_sysctl.c | |
parent | lib: Make prime number generator independently selectable (diff) | |
download | linux-2f56f84511367ce5ffd4a1c88dcd770ef049ea96.tar.xz linux-2f56f84511367ce5ffd4a1c88dcd770ef049ea96.zip |
lib: Make test_sysctl initialized as module
test_sysctl.c is expected to be used as a module, but since
it does not use module_init(), it never be registered as
a module and not appeared under /sys/module/.
In the result, the selftests/sysctl/sysctl.sh always fails
to find the test module and is skipped.
This makes test_sysctl.c initialized as a module by module_init()
and allow sysctl.sh to find the test module is loaded.
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'lib/test_sysctl.c')
-rw-r--r-- | lib/test_sysctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/test_sysctl.c b/lib/test_sysctl.c index 566dad3f4196..ec4d0f03475d 100644 --- a/lib/test_sysctl.c +++ b/lib/test_sysctl.c @@ -149,7 +149,7 @@ static int __init test_sysctl_init(void) } return 0; } -late_initcall(test_sysctl_init); +module_init(test_sysctl_init); static void __exit test_sysctl_exit(void) { |