bus_remove_driver(9)
π¦ bus_remove_driver β the bus_remove_driver(9) page, kernel API manual edition β¨
okay bestie, so this is a page straight out of the kernel API manual (that's the manual name, we're not copying the header line, we're just saying it π ), and it's literally about taking a driver off a bus. short page, but it ATE. let's go π
πΈ NAME πΈ
bus_remove_driver β delete driver from bus's knowledge.
like, the bus is gonna forget this driver ever existed. not me doing a memory wipe on the bus π
β¨ SYNOPSIS β¨
void bus_remove_driver (struct device_driver *drv );
no return value, it's void, it just does the thing and dips π«Ά
π ARGUMENTS π
drvβ driver. that's it. that's the whole argument. a driver. the one you're about to remove. iconic non-explanation honestly π
π₯ DESCRIPTION π₯
so here's the whole vibe, step by step:
- Detach the driver from the devices it controls. yes, from all of them. it's giving breakup with the entire group chat π
- Remove it from its bus's list of drivers. the bus no longer claims it. unfollowed, unfriended, blocked π
- Finally β the important bit β we drop the reference to the bus we took in
bus_add_driver. goodbye ref, we hardly knew ye π§ lowkey this is the part that makes the whole thing balanced, so don't skip it, fr fr
ngl, this is the cleanup counterpart to bus_add_driver β you add it, you take the ref, and here you're handing that ref back. it's the circle of life but for kernel objects π
π SEE ALSO π
Kernel file ./drivers/base/bus.c, plus 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_rescan_devices(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, bestie π
it lives in ./drivers/base, stamped October 2026, and honestly? she's short, she's sweet, she drops a bus ref and she leaves. main character energy fr πβπ
π¦ 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