diff options
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/Kconfig | 2 | ||||
-rw-r--r-- | drivers/pci/pci-sysfs.c | 5 | ||||
-rw-r--r-- | drivers/pci/setup-bus.c | 5 |
3 files changed, 7 insertions, 5 deletions
diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig index 9a249c65aedc..7065a8e5f9b1 100644 --- a/drivers/pci/Kconfig +++ b/drivers/pci/Kconfig @@ -221,7 +221,7 @@ config PCI_LABEL config PCI_HYPERV tristate "Hyper-V PCI Frontend" - depends on ((X86 && X86_64) || ARM64) && HYPERV && PCI_MSI && SYSFS + depends on ((X86 && X86_64) || ARM64) && HYPERV_VMBUS && PCI_MSI && SYSFS select PCI_HYPERV_INTERFACE select IRQ_MSI_LIB help diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index af74cf02bb90..9d6f74bd95f8 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c @@ -1517,8 +1517,9 @@ static ssize_t reset_method_store(struct device *dev, return count; } - pm_runtime_get_sync(dev); - struct device *pmdev __free(pm_runtime_put) = dev; + ACQUIRE(pm_runtime_active_try, pm)(dev); + if (ACQUIRE_ERR(pm_runtime_active_try, &pm)) + return -ENXIO; if (sysfs_streq(buf, "default")) { pci_init_reset_methods(pdev); diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 362ad108794d..4a8735b275e4 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c @@ -2085,7 +2085,8 @@ static void pci_bus_distribute_available_resources(struct pci_bus *bus, int i; for (i = 0; i < PCI_P2P_BRIDGE_RESOURCE_NUM; i++) { - struct resource *res = pci_bus_resource_n(bus, i); + struct resource *res = + pci_resource_n(bridge, PCI_BRIDGE_RESOURCES + i); available[i] = available_in[i]; @@ -2158,7 +2159,7 @@ static void pci_bus_distribute_available_resources(struct pci_bus *bus, continue; for (i = 0; i < PCI_P2P_BRIDGE_RESOURCE_NUM; i++) { - res = pci_bus_resource_n(bus, i); + res = pci_resource_n(dev, PCI_BRIDGE_RESOURCES + i); /* * Make sure the split resource space is properly |