of_node_get(9)
π 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,NULLis supported β no fr fr, they built that in on purpose <highlight>to simplify writing of callers</highlight>. so you can just vibe and passNULLthrough without a wholeifstatement 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:
of_node_put(9)of_attach_node(9)of_detach_node(9)of_node_release(9)__of_prop_dup(9)__of_node_dup(9)of_changeset_create_node(9)of_changeset_init(9)of_changeset_destroy(9)of_changeset_apply(9)of_changeset_revert(9)of_changeset_action(9)of_changeset_add_prop_string(9)of_changeset_add_prop_string_array(9)of_changeset_add_prop_u32_array(9)of_changeset_add_prop_bool(9)of_changeset_update_prop_string(9)
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
- 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