]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI: PCI: Rework acpi_get_pci_dev()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 10 Sep 2022 13:23:46 +0000 (15:23 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 22 Sep 2022 19:11:58 +0000 (21:11 +0200)
commitdd90a53aeb730fc19a6f972f613e5d2dfc90e0ab
tree9b3c00ff1d90752cc355e1b670df875a75c3fe52
parent27f9b03c399355c5a93e7f1cf491765f72d4bb7d
ACPI: PCI: Rework acpi_get_pci_dev()

The PCI device returned by acpi_get_pci_dev() needs to be registered,
so if it corresponds to an ACPI device object, the struct acpi_device
representing that object must be registered too and, moreover, it
should be the ACPI companion of the given PCI device.  Thus it should
be sufficient to look for it in the ACPI device object's list of
physical nodes associated with it.

Modify the code accordingly.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/acpi/pci_root.c