class_dev_iter_init(9)
π 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β thedevice_typeof the devices to iterate over, orNULLfor 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,startis the only branchy bit here β set it or leave itNULLand 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:
class_to_subsys(9)class_create(9)class_destroy(9)class_dev_iter_next(9)class_dev_iter_exit(9)class_for_each_device(9)class_find_device(9)class_compat_register(9)class_compat_unregister(9)class_compat_create_link(9)class_compat_remove_link(9)class_is_registered(9)
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
- 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