builtin_driver(9)

📦 version 7.3.1, in nixpkgs unstable

💫 builtin_driver(9) — your new fave Kernel API Manual moment 💫

okay so before we even start, yes this is a real page from the Kernel API Manual and yes it's lowkey one of the shortest ones you'll ever read, so consider this your little study break bestie ✨


🌸 NAME 🌸

builtin_driver — a helper macro for drivers that genuinely don't do anything special in init and have no exit at all. It's giving "minimal effort, maximum slay" because it eliminates some boilerplate for you 💅

Real talk though, there are rules:

  • each driver may only use this macro once 🎀
  • calling it replaces device_initcall (or in some cases, the legacy __initcall)
  • it's meant to be a direct parallel of module_driver() above it, but without the __exit stuff — because that stuff isn't used for builtin cases, periodt 🫶

✨ SYNOPSIS ✨

builtin_driver (__driver , __register , ... );

that's it. that's the whole vibe check. 🌈


🦋 ARGUMENTS 🦋

  • __driver — the driver name, bestie. that's the whole thing. 👑
  • __register — the register function for this driver type. the main character of the argument list ngl 🔥
  • ... — additional arguments to be passed to __register. yes we're passing the whole squad along 🙈

💜 DESCRIPTION 💜

okay so here's the tea: use this macro to construct bus specific macros for registering drivers.

and then the part where I have to be a little stern with you:

do not use it on its own. fr fr. it's a building block, not a standalone moment. 😭

it's literally the builtin twin of module_driver() — same energy, none of the __exit baggage 🧚


⭐ SEE ALSO ⭐

go off and read these next, iykyk:


and that's the page!! 🍓 this cutie lives in ./include/linux/device — that's the source/version, and it's dated October 2026, so yeah, future icon behavior honestly 🎀💖 mwah, go register some builtin drivers responsibly 🦋✨

📦 where this page comes from