X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=init%2Fmain.c;h=63534a141b4eb6c0f36c5ac0d99d2733028ff96e;hb=c6699b58f4fe2f968f036a862c09ce44b6968376;hp=cee4b5c66d81e1362fba3c7890eb1c86ab8c1abd;hpb=98380536ee1195dadee0ae5ec8b80e3eda8be15b;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git diff --git a/init/main.c b/init/main.c index cee4b5c..63534a1 100644 --- a/init/main.c +++ b/init/main.c @@ -70,6 +70,8 @@ #include #include #include +#include +#include #include #include @@ -794,6 +796,17 @@ static void __init do_pre_smp_initcalls(void) do_one_initcall(*fn); } +/* + * This function requests modules which should be loaded by default and is + * called twice right after initrd is mounted and right before init is + * exec'd. If such modules are on either initrd or rootfs, they will be + * loaded before control is passed to userland. + */ +void __init load_default_modules(void) +{ + load_default_elevator_module(); +} + static int run_init_process(const char *init_filename) { argv_init[0] = init_filename; @@ -900,4 +913,7 @@ static noinline void __init kernel_init_freeable(void) * we're essentially up and running. Get rid of the * initmem segments and start the user-mode stuff.. */ + + /* rootfs is available now, try loading default modules */ + load_default_modules(); }