of_node_get(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– of_node_get(9) πŸ’–

okay so real talk, bestie β€” this is of_node_get(9) from the Kernel API Manual, and it's genuinely one of the sweetest little functions in the whole device-tree cinematic universe. it does exactly one thing and it does it iconically πŸŽ€


✨ NAME ✨

of_node_get β€” Increment refcount of a node

like... that's it. that's the whole gig. and honestly? she ate πŸ’…


🌸 SYNOPSIS 🌸

struct device_node * of_node_get (struct device_node *node );

no cap, that signature is the main character. one pointer in, one pointer out πŸ¦‹


🧚 ARGUMENTS 🧚

  • node β€” the Node to inc refcount. and bestie, NULL is supported β€” no fr fr, they built that in on purpose <highlight>to simplify writing of callers</highlight>. so you can just vibe and pass NULL through without a whole if statement situation. iykyk πŸ’œ

⭐ RETURN ⭐

The node with refcount incremented. that's the return value. that's the whole thing. it's giving "you get the node back, but now it's protected" πŸ‘‘

just remember, bestie β€” you bumped that refcount, so somebody (you, it's you) has got to put it back down. of_node_put(9) is literally right there in SEE ALSO, she's waiting 🫢

πŸ’€ SEE ALSO πŸ’€

Kernel file ./drivers/of/dynamic.c β€” and the whole entire friend group:


and that's the whole page, bestie πŸ’– this masterpiece lives in ./drivers/of, dated October 2026, and it's filed under the name of_node_get(9) πŸŽ€ go forth and increment responsibly ✨🌸

πŸ“¦ where this page comes from