[PATCH v1 0/4] ACPI: Add and use acpi_dev_get_pci_dev()

From: Rafael J. Wysocki

Date: Wed Jul 15 2026 - 11:47:50 EST


Hi All,

This series is based on the observation that the majority of acpi_get_pci_dev()
callers already know the ACPI device they want to look up the PCI device for
and so they don't need to look up the ACPI device. Accordingly, a function for
PCI device lookup based on an ACPI device is introduced and used.

The first patch is a simplification utilizing a mutex guard.

The second patch introduces acpi_dev_get_pci_dev() and redefines
acpi_get_pci_dev() as a static inline helper.

The third patch moves a device_put() call in the ACPI video bus driver to
a place after the device in question has been used.

The last patch updates the ACPI video bus driver, which is the heaviest user
of acpi_get_pci_dev(), to use acpi_dev_get_pci_dev() instead of it.

Thanks!