psp_dev_create(9)
π psp_dev_create(9) β like, the Kernel API Manual, but make it make sense
okay so bestie, welcome to psp_dev_create from the Kernel API Manual β¨ this is the little function that literally births a PSP device and gets it registered β main character energy from the very first line, no cap π
πΈ NAME πΈ
psp_dev_create β create and register a PSP device π¦ (yes, that's the whole vibe: you make it, and it goes live)
β¨ SYNOPSIS β¨
struct psp_dev * psp_dev_create (struct net_device *netdev , struct
psp_dev_ops *psd_ops , struct psp_dev_caps *psd_caps , void *priv_ptr );
so you call it and it hands you back a struct psp_dev * β that's it, that's the whole flex π
π«Ά ARGUMENTS π«Ά
four things, bestie, and each one matters, ok? don't skip any of them, this is not a vibe check you wanna fail π
netdevβ the main netdevice π like, the actual netdev this whole party is attached to.psd_opsβ the driver callbacks π your driver's little stack of "here's what to do when X happens" functions.psd_capsβ the device capabilities β all the things this device can actually do. brag about it, it's allowed.priv_ptrβ a back-pointer to the driver's private data π₯ your own little stash of stuff, kept safe and pointed at.
π RETURN π
it returns a pointer to the allocated PSP device π β slay, iconic, exactly what you wanted.
or it returns ERR_PTR π which is the "nope, something went wrong" pointer. so pls pls pls check it with IS_ERR() before you go dereferencing, i'm begging π that's not in the page, that's just me caring about you.
β οΈ fr fr: the return is either a valid pointer to the allocated PSP device or anERR_PTR. it is not going to beNULL-and-chill, it'sERR_PTR. treat accordingly, bestie.
π¦ SEE ALSO π¦
go read these next, iykwiyk π
- Kernel file
./net/psp/psp_main.cπ β the source, right there, go look PSP locking(9)πpsp_dev_check_access(9)π΅οΈpsp_dev_unregister(9)π§Ή (the one you call when the era ends, periodt)
and that's the page!! mwah π
π cute sign-off time: this little beauty lives in./net/psp, it's dated October 2026, and it's pagepsp_dev_create(9)of the Kernel API Manual. take care of her π«Άβ¨
π¦ 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