]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI: glue: Look for ACPI bus type only if ACPI companion is not known
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 18 Sep 2021 13:02:23 +0000 (15:02 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 27 Sep 2021 15:01:37 +0000 (17:01 +0200)
commit1b39a271e77b63f8c94124d44711a4cb04bcbaa9
treebd93836e9c8523226dac046afcd40b3a7ecea6d9
parent0d2ce5450666d9a29055fd005325531b264f6b0b
ACPI: glue: Look for ACPI bus type only if ACPI companion is not known

Notice that it is not necessary to look for the "ACPI bus type" of
the device in acpi_device_notify() if the device's ACPI companion
is set upfront, so modify the code to do that lookup only if it is
necessary to find the ACPI companion.

Also notice that if the device's ACPI companion is not set upfront
in acpi_device_notify(), the device cannot be either a PCI one or a
platform one, so check for these bus types only if the device's
ACPI companion is set.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Ferry Toth <fntoth@gmail.com>
drivers/acpi/glue.c