Skip to content

Commit 9fbdc05

Browse files
andy-shevrafaeljw
authored andcommitted
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 <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 8a749fd commit 9fbdc05

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/acpi/pci_root.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,9 +1055,9 @@ struct pci_bus *acpi_pci_root_create(struct acpi_pci_root *root,
10551055
* exists and returns 0, we must preserve any PCI resource
10561056
* assignments made by firmware for this host bridge.
10571057
*/
1058-
obj = acpi_evaluate_dsm(ACPI_HANDLE(bus->bridge), &pci_acpi_dsm_guid, 1,
1059-
DSM_PCI_PRESERVE_BOOT_CONFIG, NULL);
1060-
if (obj && obj->type == ACPI_TYPE_INTEGER && obj->integer.value == 0)
1058+
obj = acpi_evaluate_dsm_typed(ACPI_HANDLE(bus->bridge), &pci_acpi_dsm_guid, 1,
1059+
DSM_PCI_PRESERVE_BOOT_CONFIG, NULL, ACPI_TYPE_INTEGER);
1060+
if (obj && obj->integer.value == 0)
10611061
host_bridge->preserve_config = 1;
10621062
ACPI_FREE(obj);
10631063

0 commit comments

Comments
 (0)