of_node_init(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– of_node_init(9) β€” initialize a devicetree node πŸ’–

okay bestie, this is the Kernel API Manual page for of_node_init(9), and it is literally about initializing a devicetree node. tiny function, very "set the refcount and go" energy ✨


🌸 NAME 🌸

of_node_init β€” initialize a devicetree node


✨ SYNOPSIS ✨

void of_node_init (struct device_node *node );

πŸŽ€ ARGUMENTS πŸŽ€

  • node β€” a pointer to the device node that has been created by kzalloc 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so on return, the device_node refcount is set to one. when you're done with node, use of_node_put on it to free the memory allocated for it.

and here's the important plot twist: if the node is NOT a dynamic node, that memory will not be freed. the decision of whether to free the memory will be done by node->release, which is of_node_release. no cap, that's the whole vibe πŸ˜­πŸ’…


πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./include/linux/of.h, plus all these icons:


that's the whole page, bestie πŸ’– source/version line: ./include/linux β€’ October 2026 β€’ of_node_init(9) β€” mwah, go init responsibly 🫢✨

πŸ“¦ where this page comes from