PCI: Unify ACPI and DT 'preserve config' support

Unify the 'preserve config' support across ACPI and device-tree
boot flows.

Link: https://lore.kernel.org/r/20240508174138.3630283-4-vidyas@nvidia.com
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:
Vidya Sagar 2024-05-08 23:11:37 +05:30 committed by Bjorn Helgaas
parent 407abde9ca
commit 1e6922482c

View File

@ -894,6 +894,9 @@ static bool pci_preserve_config(struct pci_host_bridge *host_bridge)
if (pci_acpi_preserve_config(host_bridge))
return true;
if (host_bridge->dev.parent && host_bridge->dev.parent->of_node)
return of_pci_preserve_config(host_bridge->dev.parent->of_node);
return false;
}