nvmem_device_find(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ nvmem_device_find(9) ✨

okay bestie, welcome to the Kernel API Manual πŸ’– this one's a little function-hunting gem from the kernel, and yes it's giving "find your friend in a crowd" energy 🫢


🌸 NAME 🌸

nvmem_device_find β€” find an nvmem device with a matching function, iykyk πŸ”πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

struct nvmem_device * nvmem_device_find (void *data , int
(*match)(struct device *dev, const void *data) );

πŸŽ€ ARGUMENTS πŸŽ€

  • data β€” the data you're handing off to the match function. it's literally just passed along, no cap πŸ“
  • match β€” the callback function that checks the device. this is your vibe check, the thing that decides who's the one πŸ‘‘

⭐ RETURN ⭐

ERR_PTR on error, or a valid pointer to a struct nvmem_device on success. so either it's a slay ✨ or it's an error pointer, and you gotta handle both, fr fr 😭

quick reminder bestie: ERR_PTR isn't NULL! check with the proper macros, don't just do if (!ptr) or the kernel will be like "???" πŸ’€

🌈 SEE ALSO 🌈

Kernel file ./drivers/nvmem/core.c β€” the whole friend group lives here πŸ’œ


and that's the whole page, bestie, you ate that 🫢✨ this one came from the kernel source at ./drivers/nvmem and the manual page is dated October 2026 β€” iconic, periodt πŸ’…πŸ‘‘

πŸ“¦ where this page comes from