Skip to content

Commit 302666d

Browse files
committed
PCI / PM: Drop unnecessary invocations of pcibios_pm_ops callbacks
The only user of non-empty pcibios_pm_ops is s390 and it only uses "noirq" callbacks, so drop the invocations of the other pcibios_pm_ops callbacks from the PCI PM code. That will allow subsequent changes to be somewhat simpler. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent 0eab11c commit 302666d

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

drivers/pci/pci-driver.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -922,9 +922,6 @@ static int pci_pm_freeze(struct device *dev)
922922
return error;
923923
}
924924

925-
if (pcibios_pm_ops.freeze)
926-
return pcibios_pm_ops.freeze(dev);
927-
928925
return 0;
929926
}
930927

@@ -986,12 +983,6 @@ static int pci_pm_thaw(struct device *dev)
986983
const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;
987984
int error = 0;
988985

989-
if (pcibios_pm_ops.thaw) {
990-
error = pcibios_pm_ops.thaw(dev);
991-
if (error)
992-
return error;
993-
}
994-
995986
if (pci_has_legacy_pm_support(pci_dev))
996987
return pci_legacy_resume(dev);
997988

@@ -1036,9 +1027,6 @@ static int pci_pm_poweroff(struct device *dev)
10361027
Fixup:
10371028
pci_fixup_device(pci_fixup_suspend, pci_dev);
10381029

1039-
if (pcibios_pm_ops.poweroff)
1040-
return pcibios_pm_ops.poweroff(dev);
1041-
10421030
return 0;
10431031
}
10441032

@@ -1111,12 +1099,6 @@ static int pci_pm_restore(struct device *dev)
11111099
const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;
11121100
int error = 0;
11131101

1114-
if (pcibios_pm_ops.restore) {
1115-
error = pcibios_pm_ops.restore(dev);
1116-
if (error)
1117-
return error;
1118-
}
1119-
11201102
/*
11211103
* This is necessary for the hibernation error path in which restore is
11221104
* called without restoring the standard config registers of the device.

0 commit comments

Comments
 (0)