module_pnp_driver(9)
β¨ module_pnp_driver(9) β¨
okay so bestie, we're in the Kernel API Manual today and this one is a whole little macro moment, fr fr π
πΈ NAME πΈ
module_pnp_driver β the helper macro for registering a PnP driver π
π¦ SYNOPSIS π¦
module_pnp_driver (__pnp_driver );
like, that's it, that's the whole call π so clean
π ARGUMENTS π
__pnp_driverβ apnp_driverstruct. that's the one thing you hand it. that's the vibe check. π
π DESCRIPTION π
okay so here's the tea β β this is a helper macro for PnP drivers that don't do anything special in module_init/exit. literally nothing extra, no little side quests, just vibes.
the way it eliminates a lot of boilerplate?? iconic. you don't have to hand-write all that setup scaffolding, the macro ate and left no crumbs π₯
β οΈ important rule bestie, don't miss this one: each module may only use this macro once. one (1) time. periodt. π
and calling it replaces module_init and module_exit β so like, don't go calling those too, that's not the move π
π§ SEE ALSO π§
- Kernel file
./include/linux/pnp.hβ go read it, iykyk πβ¨
mwah, that's the page π«Ά the source is ./include/linux, dated October 2026, and it's all about module_pnp_driver(9) β slay safe out there in the kernel, bestie πππ¦
π¦ 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