module_pnp_driver(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 β€” a pnp_driver struct. 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