driver_probe_device(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– driver_probe_device(9) πŸ’–

straight up from the Kernel API Manual 🌸 β€” this is the lil matchmaker that tries to bind a device & driver together. bestie, it's giving "will they? won't they?" but in kernel space πŸ’….

🌸 NAME 🌸

driver_probe_device β€” attempt to bind device & driver together. no cap, that's literally the mission.

✨ SYNOPSIS ✨

here's the signature, untouched because we do not edit code with vibes:

int driver_probe_device (const struct device_driver *drv , struct device
       *dev );

πŸŽ€ ARGUMENTS πŸŽ€

  • drv β€” the driver to bind a device to. driver side of the pair-up.
  • dev β€” the device to try to bind to the driver. the other half of the ship.

πŸ’… DESCRIPTION πŸ’…

okay so the return values are the whole plot, and they are iconic: this function returns -ENODEV if the device is not registered, -EBUSY if it already has a driver, 0 if the device is bound successfully, and a positive (inverted) error code for failures from the ->probe method. yes, positive and inverted β€” don't let that confuse you, bestie 🫢.

the lock situation is not optional 🚨: this function must be called with dev lock held. when it's called for a USB interface, dev->parent lock must be held as well. both. no skipping. periodt.

if the device has a parent, runtime-resume the parent before driver probing. parent gets a little main character wake-up first, iykyk ✨.

🌈 SEE ALSO 🌈

the kernel file is ./drivers/base/dd.c, and the whole SEE ALSO friend group is right here:


and that's the page, bestie 🫢 source/version tea: ./drivers/base; date tea: October 2026; and yes, this is driver_probe_device(9) signing off with a sparkle πŸ’–βœ¨

πŸ“¦ where this page comes from