diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2023-10-02 16:54:24 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2023-10-03 15:46:14 +0200 |
commit | 9fbdc0504244a3c958a0ef4f0ff7016072553f71 (patch) | |
tree | 877e08957a427458dde4c9f6ed09f5c5031b9c7d /drivers/acpi/pci_root.c | |
parent | 8a749fd1a8720d4619c91c8b6e7528c0a355c0aa (diff) | |
download | linux-9fbdc0504244a3c958a0ef4f0ff7016072553f71.tar.gz linux-9fbdc0504244a3c958a0ef4f0ff7016072553f71.tar.bz2 linux-9fbdc0504244a3c958a0ef4f0ff7016072553f71.zip |
ACPI: PCI: Switch to use acpi_evaluate_dsm_typed()
The acpi_evaluate_dsm_typed() provides a way to check the type of the
object evaluated by _DSM call. Use it instead of open coded variant.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/pci_root.c')
-rw-r--r-- | drivers/acpi/pci_root.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index 84030804a763..58b89b8d950e 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c @@ -1055,9 +1055,9 @@ struct pci_bus *acpi_pci_root_create(struct acpi_pci_root *root, * exists and returns 0, we must preserve any PCI resource * assignments made by firmware for this host bridge. */ - obj = acpi_evaluate_dsm(ACPI_HANDLE(bus->bridge), &pci_acpi_dsm_guid, 1, - DSM_PCI_PRESERVE_BOOT_CONFIG, NULL); - if (obj && obj->type == ACPI_TYPE_INTEGER && obj->integer.value == 0) + obj = acpi_evaluate_dsm_typed(ACPI_HANDLE(bus->bridge), &pci_acpi_dsm_guid, 1, + DSM_PCI_PRESERVE_BOOT_CONFIG, NULL, ACPI_TYPE_INTEGER); + if (obj && obj->integer.value == 0) host_bridge->preserve_config = 1; ACPI_FREE(obj); |