acpi_set_modalias(9)
π acpi_set_modalias β a.k.a. the acpi_set_modalias(9) kernel API page, bestie edition π
okay so this is a page from the Kernel API Manual and it's literally about setting a modalias. yes, that modalias. sit down, grab a strawberry, we're doing this π
β¨ NAME β¨
acpi_set_modalias β set modalias using the "compatible" property or a supplied ID. that's it, that's the whole vibe. no cap. π
πΈ SYNOPSIS πΈ
void acpi_set_modalias (struct acpi_device *adev , const char
*default_id , char *modalias , size_t len );
look at her. iconic signature. four params, void return, zero drama (until the buffer's too small, but that's a len problem, not ours π).
π ARGUMENTS π
adevβ the ACPI device object we're trying to match. this is the main character of the function, fr fr. πdefault_idβ the ID string we fall back to if there's, like, no compatible string found. the backup bestie. π«Άmodaliasβ a pointer to the buffer where the modalias value gets copied into. it's giving "here's where the answer goes". β¨lenβ the length of themodaliasbuffer. know your limits, babe. π
π¦ DESCRIPTION π¦
so here's the tea: this is the counterpart of of_alias_from_compatible for struct acpi_device objects. like, the ACPI version of that whole situation. π
if there is a compatible string for adev, it gets copied into modalias β but with the vendor prefix stripped, okay? stripped. gone. not invited. βοΈβ¨
otherwise β and this is the important bit β default_id will be used instead. so either way you're walking out of here with something in that buffer. slay. π
π SEE ALSO π
the whole friend group, alive and well, living in the kernel file ./drivers/acpi/bus.c:
acpi_bus_notify(9)devm_acpi_install_notify_handler(9)acpi_bus_get_primary_device(9)acpi_get_first_physical_node(9)acpi_device_is_first_physical_node(9)acpi_of_match_device(9)acpi_match_acpi_device(9)acpi_match_device(9)acpi_bus_find_device_by_name(9)acpi_early_init(9)acpi_subsystem_init(9)
go read them. iykyk. ππ¦
and that's the page!! π this one lives in ./drivers/acpi, dated October 2026, and it's the acpi_set_modalias(9) entry in the Kernel API Manual. mwah. obsessed. bye 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