psp_dev_create(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 an ERR_PTR. it is not going to be NULL-and-chill, it's ERR_PTR. treat accordingly, bestie.

πŸ¦‹ SEE ALSO πŸ¦‹

go read these next, iykwiyk πŸ’œ


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 page psp_dev_create(9) of the Kernel API Manual. take care of her 🫢✨
πŸ“¦ where this page comes from