acpi_bus_get_primary_device(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

Okay bestie, welcome to the acpi_bus_get_primary_device(9) page from the Kernel API Manual πŸ’– This one is short, sweet, and very β€œfind the first physical device” coded. Let’s go ✨

🌸 NAME 🌸

  • acpi_bus_get_primary_device β€” Get first physical device for a given ACPI one πŸŽ€

✨ SYNOPSIS ✨

struct device * acpi_bus_get_primary_device (struct acpi_device *adev );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • adev β€” ACPI device to get the first physical device for.

πŸ’… DESCRIPTION πŸ’…

So the whole vibe is: find the first physical device for which adev is the ACPI companion, and reference count it if present. That’s literally the job, bestie ✨

πŸ”₯ RETURN πŸ”₯

You get back a pointer to the first physical counterpart of adev, or NULL if there are none. πŸ’€

⚠️ Callers are responsible for invoking put_device on the returned device. Don’t forget β€” that’s the main-character responsibility arc 🫢

🌈 SEE ALSO 🌈

Kernel file: ./drivers/acpi/bus.c


mwah πŸ’‹ β€” source/version: ./drivers/acpi, date: October 2026, page: acpi_bus_get_primary_device(9). Bye bestie 🌈

πŸ“¦ where this page comes from