fwnode_get_next_parent(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… fwnode_get_next_parent β€” Kernel API Manual ✨

Okay bestie, gather round, because this one is a little function with a big personality. It lives in the Kernel API Manual, and it's basically the "go up one level" button for firmware nodes. Family tree energy. 🌳


🌸 NAME 🌸

fwnode_get_next_parent β€” literally just: iterate to the node's parent. That's it. That's the whole vibe check. πŸ’–


✨ SYNOPSIS ✨

struct fwnode_handle * fwnode_get_next_parent (struct fwnode_handle
*fwnode );

πŸŽ€ ARGUMENTS πŸŽ€

  • fwnode β€” the firmware node whose parent you're trying to retrieve. Like, "who's your mom", but for kernel objects. 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea: this is like fwnode_get_parent, except β€” and this is the iconic part β€” it drops the refcount on the passed node. Dropping the refcount is what makes it suitable for iterating through a node's parents. It's giving "one-way door, no looking back" energy. πŸšͺ✨

⚠️ Also, heads up: the caller is responsible for calling fwnode_handle_put on the returned fwnode pointer. And note that this function also puts a reference to fwnode unconditionally. Unconditionally! No cap. So don't be out here thinking you still own that reference after you call this. 😭

πŸ”₯ RETURN πŸ”₯

You get the parent firmware node of the given node if possible β€” or NULL if no parent was available. Simple as that. If there's no parent, bestie, there's no parent. πŸ’€


πŸ‘‘ SEE ALSO πŸ‘‘

This function rolls with a huge friend group, so let's give everyone their shoutout. Kernel file ./drivers/base/property.c β€” that's where the magic lives, iykyk. 🌈


πŸ’– That's the whole page, bestie! Stay hydrated, put your refcounts where they belong, and remember: this lil doc came to you courtesy of ./drivers/base, dated October 2026, in the Kernel API Manual. Slay. πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from