acpi_dev_get...st_match_dev(9)
π 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: passNULLto not check_UIDπhrvβ Hardware Revision of the device, and same deal β pass-1to 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:
acpi_handle_list_equal(9)acpi_handle_list_replace(9)acpi_handle_list_free(9)acpi_device_dep(9)acpi_evaluate_ost(9)acpi_handle_path(9)acpi_handle_printk(9)__acpi_handle_debug(9)acpi_evaluation_failure_warn(9)acpi_has_method(9)acpi_evaluate_ej0(9)acpi_evaluate_lck(9)acpi_evaluate_reg(9)acpi_evaluate_dsm(9)acpi_check_dsm(9)acpi_dev_uid_to_integer(9)acpi_dev_found(9)acpi_dev_present(9)acpi_dev_get_next_match_dev(9)acpi_reduced_hardware(9)acpi_dev_is_video_device(9)acpi_match_platform_list(9)
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
- 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