bus_find_device_by_acpi_dev(9)
π bus_find_device_by_acpi_dev(9) β Kernel API Manual π
okay so bestie, welcome to the kernel API manual, section 9 (that's the kernel developer one, iykyk). this page is literally all about bus_find_device_by_acpi_dev, and no cap, it's one of those lil iterator helpers that saves you from writing a whole for-loop yourself. she's giving "glorified device matcher" and honestly? iconic. π
β¨ NAME β¨
bus_find_device_by_acpi_dev β device iterator for locating a particular device matching the ACPI COMPANION device.
like, she walks the bus, she checks every device, and she comes back with the one whose ACPI companion is the one you asked for. main character energy fr fr π
πΈ SYNOPSIS πΈ
struct device * bus_find_device_by_acpi_dev (const struct bus_type *bus
, const struct acpi_device *adev );
so you hand her a bus type and an ACPI companion device, and she returns a struct device *. simple! clean! slay! β¨
π¦ ARGUMENTS π¦
busβ the bus type. yes, the bus. the one you're iterating over. give her the bus and she'll do the rest, periodt.adevβ the ACPI COMPANION device to match. this is the one she's hunting for β if a device's companion is this one, that device is your winner. π
ngl bestie, both of these are const pointers, so don't go getting any ideas about modifying them through her. π
π«Ά SEE ALSO π«Ά
- Kernel file
./include/linux/device/bus.hstruct bus_type(9) bus_find_device_by_name(9)bus_find_device_by_of_node(9)bus_find_device_by_fwnode(9)bus_find_device_by_devt(9)bus_find_next_device(9)enum bus_notifier_event(9)
like her whole friend group honestly β if you vibe with this one you're gonna want to meet the rest of the bus_find_device_by_* squad. they're all matching devices one way or another, just with different keys. π
and that's the whole page, bestie! β¨ this one lives under ./include/linux/device and the version up in the corner says October 2026 β so if you're reading her later than that, hi from the past, hope the kernel's still compiling ππ. mwah, go find that device! ππ
π¦ 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