Skip to content

Commit

Permalink
hwrng: core - explicit ordering of initcalls
Browse files Browse the repository at this point in the history
hw-random device drivers depend on the hw-random core being
initialized. Make this ordering explicit, also for the case
these drivers are built-in. As the core itself depends on
misc_register() which is set up at subsys_initcall time,
advance the initialization of the core (only) to the
fs_initcall() level.

Cc: Matt Mackall <[email protected]>
Cc: Herbert Xu <[email protected]>
Cc: Jason A. Donenfeld <[email protected]>
Signed-off-by: Dominik Brodowski <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
Dominik Brodowski authored and herbertx committed Feb 5, 2022
1 parent 1c4cafd commit 26a0398
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/char/hw_random/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ static void __exit hwrng_modexit(void)
unregister_miscdev();
}

module_init(hwrng_modinit);
fs_initcall(hwrng_modinit); /* depends on misc_register() */
module_exit(hwrng_modexit);

MODULE_DESCRIPTION("H/W Random Number Generator (RNG) driver");
Expand Down

0 comments on commit 26a0398

Please sign in to comment.