bus_rescan_devices(9)
π bus_rescan_devices β Kernel API Manual, section 9 π
okay so bestie, this is bus_rescan_devices(9) from the Kernel API Manual and it's literally the glow-up artist for lonely driverless devices, iykyk β¨
πΈ NAME πΈ
bus_rescan_devices β rescan devices on the bus for possible drivers π
like, you got devices sitting there with no driver and you're gonna go find them a match. matchmaker era π«Ά
β¨ SYNOPSIS β¨
int bus_rescan_devices (const struct bus_type *bus );
one function, one arg, no cap π₯
π ARGUMENTS π
busβ the bus to scan. that's it, that's the whole vibe. you hand it aconst struct bus_type *and it goes to work π
π¦ DESCRIPTION π¦
so here's the tea β β this function goes looking for devices on the bus that have no driver attached, and it rescans them against the existing drivers to see if it matches any. how? by calling device_attach for the unbound devices. periodt β¨
like, the unmatched devices get a second chance at love and device_attach is the wingman ππ
it's giving "second-chance romance" and honestly? obsessed.
ngl the whole point is the unbound ones β devices that already have a driver aren't the target here, bestie. it's specifically the driverless girlies getting a re-check π§
π 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)device_reprobe(9)bus_register(9)bus_unregister(9)subsys_dev_iter_init(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)
π and that's the whole page! this iconic little entry lives in ./drivers/base and it's dated October 2026, still serving bus_rescan_devices(9) realness. go forth and attach some devices, bestie πΈπ¦β¨
π¦ 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