Commit 4c7217f1 authored by Paul Gortmaker's avatar Paul Gortmaker

lib/list_sort: use late_initcall to hook in self tests

This was using module_init, but there is no way this code can
be modular.  In the non-modular case, a module_init becomes a
device_initcall, but this really isn't a device.   So we should
choose a more appropriate initcall bucket to put it in.

Assuming boot time self tests need to be observed over a console
to be useful, and that the console device could possibly not be
fully functional until after device_initcall, we move this to the
late_initcall bucket, which is immediately after device_initcall.

Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
parent 89f08f64
...@@ -289,5 +289,5 @@ static int __init list_sort_test(void) ...@@ -289,5 +289,5 @@ static int __init list_sort_test(void)
kfree(elts); kfree(elts);
return err; return err;
} }
module_init(list_sort_test); late_initcall(list_sort_test);
#endif /* CONFIG_TEST_LIST_SORT */ #endif /* CONFIG_TEST_LIST_SORT */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment