module_init(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 🌈


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