PCI/PM: Remove unused pcibios_pm_ops
The "struct dev_pm_ops pcibios_pm_ops", declared in include/linux/pci.h and
defined in drivers/pci/pci-driver.c, provided arch-specific hooks when a
PCI device was doing a hibernate transition.
394216275c
("s390: remove broken hibernate / power management support")
removed the last use of pcibios_pm_ops, so remove it completely.
[bhelgaas: drop unused "error"]
Link: https://lore.kernel.org/r/20200730194416.1029509-1-vaibhavgupta40@gmail.com
Reported-by: Bjorn Helgaas <helgaas@kernel.org>
Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:
parent
9123e3a74e
commit
a5d02e901e
@ -969,12 +969,6 @@ static int pci_pm_resume(struct device *dev)
|
|||||||
|
|
||||||
#ifdef CONFIG_HIBERNATE_CALLBACKS
|
#ifdef CONFIG_HIBERNATE_CALLBACKS
|
||||||
|
|
||||||
/*
|
|
||||||
* pcibios_pm_ops - provide arch-specific hooks when a PCI device is doing
|
|
||||||
* a hibernate transition
|
|
||||||
*/
|
|
||||||
struct dev_pm_ops __weak pcibios_pm_ops;
|
|
||||||
|
|
||||||
static int pci_pm_freeze(struct device *dev)
|
static int pci_pm_freeze(struct device *dev)
|
||||||
{
|
{
|
||||||
struct pci_dev *pci_dev = to_pci_dev(dev);
|
struct pci_dev *pci_dev = to_pci_dev(dev);
|
||||||
@ -1033,9 +1027,6 @@ static int pci_pm_freeze_noirq(struct device *dev)
|
|||||||
|
|
||||||
pci_pm_set_unknown_state(pci_dev);
|
pci_pm_set_unknown_state(pci_dev);
|
||||||
|
|
||||||
if (pcibios_pm_ops.freeze_noirq)
|
|
||||||
return pcibios_pm_ops.freeze_noirq(dev);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1043,13 +1034,6 @@ static int pci_pm_thaw_noirq(struct device *dev)
|
|||||||
{
|
{
|
||||||
struct pci_dev *pci_dev = to_pci_dev(dev);
|
struct pci_dev *pci_dev = to_pci_dev(dev);
|
||||||
const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;
|
const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;
|
||||||
int error;
|
|
||||||
|
|
||||||
if (pcibios_pm_ops.thaw_noirq) {
|
|
||||||
error = pcibios_pm_ops.thaw_noirq(dev);
|
|
||||||
if (error)
|
|
||||||
return error;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The pm->thaw_noirq() callback assumes the device has been
|
* The pm->thaw_noirq() callback assumes the device has been
|
||||||
@ -1174,9 +1158,6 @@ static int pci_pm_poweroff_noirq(struct device *dev)
|
|||||||
|
|
||||||
pci_fixup_device(pci_fixup_suspend_late, pci_dev);
|
pci_fixup_device(pci_fixup_suspend_late, pci_dev);
|
||||||
|
|
||||||
if (pcibios_pm_ops.poweroff_noirq)
|
|
||||||
return pcibios_pm_ops.poweroff_noirq(dev);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1184,13 +1165,6 @@ static int pci_pm_restore_noirq(struct device *dev)
|
|||||||
{
|
{
|
||||||
struct pci_dev *pci_dev = to_pci_dev(dev);
|
struct pci_dev *pci_dev = to_pci_dev(dev);
|
||||||
const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;
|
const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;
|
||||||
int error;
|
|
||||||
|
|
||||||
if (pcibios_pm_ops.restore_noirq) {
|
|
||||||
error = pcibios_pm_ops.restore_noirq(dev);
|
|
||||||
if (error)
|
|
||||||
return error;
|
|
||||||
}
|
|
||||||
|
|
||||||
pci_pm_default_resume_early(pci_dev);
|
pci_pm_default_resume_early(pci_dev);
|
||||||
pci_fixup_device(pci_fixup_resume_early, pci_dev);
|
pci_fixup_device(pci_fixup_resume_early, pci_dev);
|
||||||
|
@ -2034,10 +2034,6 @@ int pcibios_alloc_irq(struct pci_dev *dev);
|
|||||||
void pcibios_free_irq(struct pci_dev *dev);
|
void pcibios_free_irq(struct pci_dev *dev);
|
||||||
resource_size_t pcibios_default_alignment(void);
|
resource_size_t pcibios_default_alignment(void);
|
||||||
|
|
||||||
#ifdef CONFIG_HIBERNATE_CALLBACKS
|
|
||||||
extern struct dev_pm_ops pcibios_pm_ops;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_PCI_MMCONFIG) || defined(CONFIG_ACPI_MCFG)
|
#if defined(CONFIG_PCI_MMCONFIG) || defined(CONFIG_ACPI_MCFG)
|
||||||
void __init pci_mmcfg_early_init(void);
|
void __init pci_mmcfg_early_init(void);
|
||||||
void __init pci_mmcfg_late_init(void);
|
void __init pci_mmcfg_late_init(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user