class_dev_iter_init(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… class_dev_iter_init(9) β€” from the Kernel API Manual, bestie

okay so you found your way to class_dev_iter_init and honestly? iconic of you. this is a kernel API page, and we're gonna get you comfy with it. no cap.


✨ NAME ✨

class_dev_iter_init β€” initialize class device iterator πŸŽ€


🌸 SYNOPSIS 🌸

void class_dev_iter_init (struct class_dev_iter *iter , const struct
class *class , const struct device *start , const struct device_type
*type );

like, that's the whole vibe. four args, one void, no drama πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • iter β€” the class iterator you're initializing. this is the main character, you're setting it up 🫢
  • class β€” the class we wanna iterate over. yes, "wanna" is literally in the manpage, we keep it ✨
  • start β€” the device to start iterating from, if any. optional queen behavior πŸ’œ
  • type β€” the device_type of the devices to iterate over, or NULL for all of them. NULL = no filter, we take everybody 🌈

πŸ’– DESCRIPTION πŸ’–

So what this does: it initializes the class iterator iter such that it iterates over devices of class. simple, clean, slay.

Now the start tea β˜• β€” if start is set, the list iteration will start there. otherwise, if it is NULL, the iteration starts at the beginning of the list. that's it, that's the whole rule. no cap, no hidden lore.

fr fr, start is the only branchy bit here β€” set it or leave it NULL and the list just starts from the top. that's the whole vibe check 🧚

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./drivers/base/class.c β€” and the whole class-y friend group:

all of them, together, a little kernel family πŸ“


anyway bestie, that's the page πŸ’… this lil drop comes to you from ./drivers/base, dated October 2026, and it's filed under class_dev_iter_init(9). go iterate something cute, mwah πŸ˜­πŸ’–

πŸ“¦ where this page comes from