Skip to content

PCI: ACPI: glue: Get rid of acpi_pci_bus and rearrange code

Rafael J. Wysocki linux-acpi linux-pci lkml 1 version New

Get series with b4
b4 am 1794818.tdWV9SEqCh@kreacher

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3PCI: ACPI: Drop acpi_pci_busdrivers/acpi/glue.c drivers/pci/pci-acpi.c include/linux/pci-acpi.h+34 -410 replies
2/3ACPI: glue: Drop cleanup callback from struct acpi_bus_typedrivers/acpi/glue.c include/acpi/acpi_bus.h+3 -100 replies
3/3ACPI: glue: Look for ACPI bus type only if ACPI companion is not knowndrivers/acpi/glue.c+17 -110 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH v1 0/3] PCI: ACPI: glue: Get rid of acpi_pci_bus and rearrange code

Hi All,

After commit 375553a93201 ("PCI: Setup ACPI fwnode early and at the same time with OF"), PCI only uses acpi_pci_bus for running the ->setup() and ->cleanup() callbacks from there, but the functions pointed to by them can be invoked directly from the ACPI "glue" code if the device being processed is a PCI one, so patch [1/3] drops acpi_pci_bus and rearranges the code to call the PCI "setup" and "cleanup" routines directly.

After that, the ->cleanup callback in struct acpi_bus_type has no users, so patch [2/3] gets rid of it.

Finally, patch [3/3] rearranges acpi_device_notify() to avoid looking up the "ACPI bus type" of the device in bus_type_list if its ACPI companion has been set upfront.

Thanks!