From: Rafael J. Wysocki Date: Mon, 10 Jan 2022 15:48:27 +0000 (+0100) Subject: Merge branches 'acpi-scan', 'acpi-pm', 'acpi-power' and 'acpi-pci' X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=b659ea768ae372e2f82c6346120f2e7272a42ac9;p=linux.git Merge branches 'acpi-scan', 'acpi-pm', 'acpi-power' and 'acpi-pci' Merge ACPI device enumeration updates, ACPI power management updates and PCI host bridge ACPI driver updates for 5.17-rc1: - Introduce acpi_fetch_acpi_dev() as a replacement for acpi_bus_get_device() and use it in the ACPI subsystem (Rafael Wysocki). - Avoid using _CID for device enumaration if _HID is missing or invalid (Rafael Wysocki). - Rework quirk handling during ACPI device enumeration and add some new quirks for known broken platforms (Hans de Goede). - Avoid unnecessary or redundant CPU cache flushing during system PM transitions (Kirill A. Shutemov). - Add PM debug messages related to power resources (Rafael Wysocki). - Fix kernel-doc comment in the PCI host bridge ACPI driver (Yang Li). * acpi-scan: serdev: Do not instantiate serdevs on boards with known bogus DSDT entries i2c: acpi: Do not instantiate I2C-clients on boards with known bogus DSDT entries ACPI / x86: Add acpi_quirk_skip_[i2c_client|serdev]_enumeration() helpers ACPI: scan: Create platform device for BCM4752 and LNV4752 ACPI nodes ACPI: Use acpi_fetch_acpi_dev() instead of acpi_bus_get_device() ACPI: scan: Introduce acpi_fetch_acpi_dev() ACPI: scan: Do not add device IDs from _CID if _HID is not valid * acpi-pm: ACPI: PM: Remove redundant cache flushing ACPI: PM: Avoid CPU cache flush when entering S4 * acpi-power: ACPI: PM: Emit debug messages when enabling/disabling wakeup power * acpi-pci: PCI/ACPI: Fix acpi_pci_osc_control_set() kernel-doc comment --- b659ea768ae372e2f82c6346120f2e7272a42ac9 diff --cc drivers/acpi/property.c index 2366f54d8e9cf,86987f903eb10,2366f54d8e9cf,e312ebaed8db4,2366f54d8e9cf..d0986bda29640 --- a/drivers/acpi/property.c +++ b/drivers/acpi/property.c @@@@@@ -1091,10 -1089,15 -1091,10 -1090,15 -1091,10 +1090,10 @@@@@@ acpi_node_get_parent(const struct fwnod /* All data nodes have parent pointer so just return that */ return to_acpi_data_node(fwnode)->parent; } else if (is_acpi_device_node(fwnode)) { - - acpi_handle handle, parent_handle; - - handle = to_acpi_device_node(fwnode)->handle; - if (ACPI_SUCCESS(acpi_get_parent(handle, &parent_handle))) { - struct acpi_device *adev; + + struct device *dev = to_acpi_device_node(fwnode)->dev.parent; - handle = to_acpi_device_node(fwnode)->handle; - if (ACPI_SUCCESS(acpi_get_parent(handle, &parent_handle))) { - struct acpi_device *adev; - - - if (!acpi_bus_get_device(parent_handle, &adev)) - - return acpi_fwnode_handle(adev); - - } + + if (dev) + + return acpi_fwnode_handle(to_acpi_device(dev)); } return NULL;