driver_find_device_by_devt(9)
β¨ driver_find_device_by_devt(9) β¨
okay so bestie, welcome to the Kernel API Manual π this one's a tiny little function page but it's lowkey doing important matchmaking work, so let's get into it π«Ά
πΈ NAME πΈ
driver_find_device_by_devt β device iterator for locating a particular device by devt.
like, it's a whole device-iterator situation whose entire personality is "find me the ONE device that matches this devt" πβ¨
π SYNOPSIS π
struct device * driver_find_device_by_devt (const struct device_driver
*drv , dev_t devt );
it's giving "returns a struct device *" and takes two args, no cap π
π¦ ARGUMENTS π¦
drvβ the driver we're iterating π this is the driver whose devices you're walking through, bestie.devtβ devt pointer to match π― the one you're holding up like a little ID card going "are you this one? no? next."
π SEE ALSO π
Kernel file ./include/linux/device/driver.h, plus the whole friend group of related reads π:
enum probe_type(9)struct device_driver(9)driver_find_device_by_name(9)driver_find_device_by_of_node(9)driver_find_device_by_fwnode(9)driver_find_device_by_acpi_dev(9)module_driver(9)builtin_driver(9)
iykyk, that's the full squad of "find a device by something" helpers β this one just happens to be the devt girlie π
π reminder: keep the types exactly as written βconst struct device_driver *drvanddev_t devtβ no "fixing" them, that's the whole api, periodt β¨
okay that's the page!! mwah π this came from ./include/linux/device, dated October 2026 β go forth and iterate responsibly, 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