acpi_dev_get...st_match_dev(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– acpi_dev_get_first_match_dev β€” from the Kernel API Manual, bestie πŸ’–

okay so this one's from the Kernel API Manual (yes the real one, we're fancy now) and honestly? it's giving "find your person at the party" energy πŸŽ€

✨ NAME ✨

acpi_dev_get_first_match_dev β€” literally returns the first match of an ACPI device πŸ¦‹


🌸 SYNOPSIS 🌸

struct acpi_device * acpi_dev_get_first_match_dev (const char *hid ,
       const char *uid , s64 hrv );

like yes that's the whole signature, no notes πŸ’…

πŸŽ€ ARGUMENTS πŸŽ€

  • hid β€” Hardware ID of the device. this is the main character of the search, ngl πŸ”₯
  • uid β€” Unique ID of the device, and here's the vibe check: pass NULL to not check _UID πŸ™ˆ
  • hrv β€” Hardware Revision of the device, and same deal β€” pass -1 to not check _HRV ⭐

πŸ’œ DESCRIPTION πŸ’œ

So basically: this returns the first match of ACPI device if a matching device was present at the moment of invocation, or NULL otherwise. no cap, that's the whole behavior β€” present at call time or you get nothing 😭

⚠️ bestie listen to me carefully: the caller is responsible for invoking acpi_dev_put on the returned device. you got the device, you clean it up. don't leave it hanging, that's not slay behavior πŸ’€

Also, see additional information in acpi_dev_present as well πŸ‘€ β€” yes, there's a whole related lore drop over there.

🌈 SEE ALSO 🌈

the whole friend group, fr fr β€” Kernel file ./drivers/acpi/utils.c plus:


and that's the page babes 🫢 it ships out of ./drivers/acpi with the manual dated October 2026 β€” iconic, timeless, periodt πŸ‘‘βœ¨

πŸ“¦ where this page comes from