bus_remove_driver(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ 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:

  1. Detach the driver from the devices it controls. yes, from all of them. it's giving breakup with the entire group chat πŸ’€
  2. Remove it from its bus's list of drivers. the bus no longer claims it. unfollowed, unfriended, blocked 🌈
  3. 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:


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