[PATCH v2 0/4] ACPI: Add and use acpi_dev_get_pci_dev()
From: Rafael J. Wysocki
Date: Thu Jul 16 2026 - 10:13:12 EST
Hi All,
This is an update of
https://lore.kernel.org/linux-acpi/5115219.31r3eYUQgx@rafael.j.wysocki/
that is sent to address review comments from Andy.
The original series description below still applies.
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!