struct device_driver *drv = dev->driver;
int error = 0;
- pci_fixup_device(pci_fixup_suspend, pci_dev);
-
if (drv && drv->pm) {
if (drv->pm->poweroff) {
error = drv->pm->poweroff(dev);
error = pci_legacy_suspend(dev, PMSG_HIBERNATE);
}
+ pci_fixup_device(pci_fixup_suspend, pci_dev);
+
return error;
}
struct device_driver *drv = dev->driver;
int error = 0;
+ pci_fixup_device(pci_fixup_resume, pci_dev);
+
if (drv && drv->pm) {
if (drv->pm->restore)
error = drv->pm->restore(dev);
} else {
error = pci_default_pm_resume_late(pci_dev);
}
- pci_fixup_device(pci_fixup_resume, pci_dev);
return error;
}
struct device_driver *drv = dev->driver;
int error = 0;
- pci_fixup_device(pci_fixup_resume, pci_dev);
+ pci_fixup_device(pci_fixup_resume_early, pci_dev);
if (drv && drv->pm) {
if (drv->pm->restore_noirq)
} else {
pci_default_pm_resume_early(pci_dev);
}
- pci_fixup_device(pci_fixup_resume_early, pci_dev);
return error;
}