module_init(9)
π module_init(9) π
okay so bestie, welcome to the Kernel API Manual corner where your driver gets its very first main-character moment β¨ This page is literally about the init entry point, and it's giving βhello, kernel, I have arrivedβ π
πΈ NAME πΈ
module_init β driver initialization entry point π«Ά
π SYNOPSIS π
module_init (x );
β¨ ARGUMENTS β¨
xβ the function that gets run at kernel boot time or when the module is inserted. That's the whole vibe check: you hand it a function, and it's the init function. β
π¦ DESCRIPTION π¦
So here's the tea, fr fr: if your code is builtin, module_init gets called during do_initcalls. If it's a module, it gets called at module insertion time. Lowkey iconic how it switches it up like that π
bestie, important: there can only be one per module. periodt. Not two, not a little extra one for luck. One. π
π SEE ALSO π
- Kernel file
./include/linux/module.h module_exit(9)struct klp_modinfo(9)try_module_get(9)module_put(9)
mwah π this module_init(9) page comes from the ./include/linux source/version and is dated October 2026 β slay, go init something responsibly π«Άβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms