device_crea...oftware_node(9)
π device_create_managed_software_node(9) β Kernel API Manual, bestie edition β¨
okay so welcome to the device_crea...oftware_node(9) page from the Kernel API Manual π β yes the title is truncated, no that's not a typo, that's just how she's listed, periodt. sit down, grab a strawberry π, we're learning about managed software nodes.
β¨ NAME β¨
device_create_managed_software_node β create a software node for a device π¦
πΈ SYNOPSIS πΈ
int device_create_managed_software_node (struct device *dev , const
struct property_entry *properties , const struct software_node *parent
);
π ARGUMENTS π
devβ the device the software node is assigned to. that's her home πpropertiesβ device properties for the software node. the whole vibe of the node, basically β¨parentβ parent of the software node. who she belongs to π
π₯ DESCRIPTION π₯
so this function creates a software node as a managed resource for dev. what does managed mean? it means the lifetime of the newly created software node is literally tied to the lifetime of dev β they're attached, no cap π when dev goes, the node goes. it's giving main character codependency.
because of that whole lifetime-tied situation, software nodes created with this function should not be reused or shared. not with your friends, not with other nodes, not at all π one node, one device, that's the rule.
also cute: the function takes a deep copy of properties for the software node. so your original properties are safe, she made her own copy π
and since the new software node is assigned directly to dev, and since it should not be shared, it is not returned to the caller. you don't get a little handle back, sorry bestie π«Ά the function returns 0 on success, and errno in case of an error. yes, errno, that's the error convention, that's how it works, periodt.
π SEE ALSO π
Kernel file ./drivers/base/swnode.c plus all her friends in the swnode cinematic universe:
property_entries_dup(9)property_entries_free(9)software_node_find_by_name(9)software_node_register_node_group(9)software_node_unregister_node_group(9)software_node_register(9)software_node_unregister(9)device_add_software_node(9)device_remove_software_node(9)
and that's the whole page, bestie π«
sign-off time π: this lil gem comes from ./drivers/base, dated October 2026, filed under device_crea...oftware_node(9) in the Kernel API Manual. go build something iconic πβπ
π¦ 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