fwnode_handle_get(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 fwnode_handle_get(9) β€” Kernel API Manual energy 🌸

okay bestie, so this one's from the Linux Kernel API manual and it is literally the glow-up page for fwnode_handle_get(9) β€” the "grab a ref, don't lose it" icon of ./drivers/base/property.c. it's giving very small function, very big responsibility πŸ’…


✨ NAME ✨

fwnode_handle_get</p> β€” obtain a reference to a device node. that's it, that's the whole vibe, no cap πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

struct fwnode_handle * fwnode_handle_get (struct fwnode_handle *fwnode
);

she takes exactly one argument and hands you back a struct fwnode_handle *. clean, minimal, main character energy ✨


πŸ“ ARGUMENTS πŸ“

  • fwnode β€” pointer to the device node you're trying to obtain the reference to. like, the actual node. the one you want. that one 🫢

πŸ’– DESCRIPTION πŸ’–

so here's the tea, and it's important tea πŸ”₯ β€” the caller is responsible for calling fwnode_handle_put on the returned fwnode pointer.

read that again. i'll wait. ⭐

you get the ref, you clean up the ref. it's not the kernel's job, it's not the garbage collector's job (there is no garbage collector bestie this is C), it's your job. so if you take it, you put it. periodt πŸ’…

fr fr, forget the fwnode_handle_put and you've got a leak. no cap, it's giving "i'll deal with it later" and later never comes 😭

πŸ‘‘ RETURN πŸ‘‘

the fwnode handle. that's the whole answer. she returns the fwnode handle, iconic behaviour, no notes 🌈


🧚 SEE ALSO 🧚

Kernel file ./drivers/base/property.c, plus this whole extended friend group of related calls β€” every single one of them, because we do not leave a bestie behind πŸ’œ


and that's the page!! πŸŽ‰ sign-off time: this lil beauty lives in ./drivers/base, dated October 2026, and it's page fwnode_handle_get(9) of the Kernel API Manual. go forth, take your refs, and put them back β€” i'm obsessed with you for reading this far, bestie πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from