of_node_init(9)
π 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 bykzallocπ«Ά
π¦ 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:
of_machine_is_compatible(9)of_parse_phandle(9)of_parse_phandle_with_args(9)of_parse_phandle_with_fixed_args(9)of_parse_phandle_with_optional_args(9)of_phandle_args_equal(9)of_property_count_u8_elems(9)of_property_count_u16_elems(9)of_property_count_u32_elems(9)of_property_count_u64_elems(9)of_property_read_string_array(9)of_property_count_strings(9)of_property_read_string_index(9)of_property_present(9)of_property_read_u8_array(9)of_property_read_u16_array(9)of_property_read_u32_array(9)of_property_read_u64_array(9)struct of_changeset_entry(9)struct of_changeset(9)of_device_is_system_power_controller(9)of_have_populated_dt(9)
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
- 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