device_for_each_child(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay bestie, this is the device_for_each_child(9) page from the Kernel API Manual ✨ it's literally the device child iterator, and we're gonna get through it together 🫢

✨ NAME ✨

  • device_for_each_child β€” device child iterator. periodt πŸ’…

πŸ¦‹ SYNOPSIS πŸ¦‹

int device_for_each_child (struct device *parent , void *data ,
       device_iter_t fn );

πŸŽ€ ARGUMENTS πŸŽ€

  • parent β€” parent struct device. iconic.
  • data β€” data for the callback.
  • fn β€” function to be called for each device.

🌸 DESCRIPTION 🌸

Iterate over parent's child devices, and call fn for each, passing it data. no cap 🧚

We check the return of fn each time. If it returns anything other than 0, we break out and return that value. that's the whole vibe check πŸ’–

πŸ”— SEE ALSO πŸ”—

The kernel file is ./drivers/base/core.c, and the SEE ALSO crew is literally all of these besties:


mwah πŸ’‹ this page came from the ./drivers/base source/version corner, dated October 2026, and it's the device_for_each_child(9) footer. bye bestie πŸŽ€πŸ’œ

πŸ“¦ where this page comes from