subsys_dev_iter_init(9)
π
subsys_dev_iter_init(9) β Kernel API Manual, but make it make sense π
πΈ NAME πΈ
subsys_dev_iter_init β initialize subsys device iterator. That's the whole vibe.
β¨ SYNOPSIS β¨
void subsys_dev_iter_init (struct subsys_dev_iter *iter , struct subsys_private *sp , struct device *start , const struct device_type *type );
π ARGUMENTS π
iterβ the subsys iterator you're initializing, bestie. Give it a home.spβ the subsys private (i.e. bus) we wanna iterate over.startβ the device to start iterating from, if any. Optional starting point, okay?typeβdevice_typeof the devices to iterate over;NULLfor all. All the devices, no filter.
π DESCRIPTION π
Okay so here's the tea: this initializes subsys iterator iter such that it iterates over devices of subsys. Iconic. If start is set, the list iteration will start there. Otherwise, if it is NULL, the iteration starts at the beginning of the list. Literally that simple.
π SEE ALSO π
Kernel file ./drivers/base/bus.c β and the whole friend group:
bus_to_subsys(9)bus_for_each_dev(9)bus_find_device(9)bus_for_each_drv(9)bus_add_device(9)bus_probe_device(9)bus_remove_device(9)bus_add_driver(9)bus_remove_driver(9)bus_rescan_devices(9)device_reprobe(9)bus_register(9)bus_unregister(9)subsys_dev_iter_next(9)subsys_dev_iter_exit(9)subsys_system_register(9)subsys_virtual_register(9)driver_find(9)bus_get_dev_root(9)
π source/version line energy: ./drivers/base Β· date: October 2026 Β· page: subsys_dev_iter_init(9) β bye bestie, go init that iterator! π
π¦ 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