diff options
Diffstat (limited to 'drivers/pci/pci-driver.c')
-rw-r--r-- | drivers/pci/pci-driver.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index c3f76be832d4..23bdf64411e5 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c | |||
@@ -611,8 +611,6 @@ static int pci_pm_poweroff(struct device *dev) | |||
611 | struct device_driver *drv = dev->driver; | 611 | struct device_driver *drv = dev->driver; |
612 | int error = 0; | 612 | int error = 0; |
613 | 613 | ||
614 | pci_fixup_device(pci_fixup_suspend, pci_dev); | ||
615 | |||
616 | if (drv && drv->pm) { | 614 | if (drv && drv->pm) { |
617 | if (drv->pm->poweroff) { | 615 | if (drv->pm->poweroff) { |
618 | error = drv->pm->poweroff(dev); | 616 | error = drv->pm->poweroff(dev); |
@@ -622,6 +620,8 @@ static int pci_pm_poweroff(struct device *dev) | |||
622 | error = pci_legacy_suspend(dev, PMSG_HIBERNATE); | 620 | error = pci_legacy_suspend(dev, PMSG_HIBERNATE); |
623 | } | 621 | } |
624 | 622 | ||
623 | pci_fixup_device(pci_fixup_suspend, pci_dev); | ||
624 | |||
625 | return error; | 625 | return error; |
626 | } | 626 | } |
627 | 627 | ||
@@ -648,6 +648,8 @@ static int pci_pm_restore(struct device *dev) | |||
648 | struct device_driver *drv = dev->driver; | 648 | struct device_driver *drv = dev->driver; |
649 | int error = 0; | 649 | int error = 0; |
650 | 650 | ||
651 | pci_fixup_device(pci_fixup_resume, pci_dev); | ||
652 | |||
651 | if (drv && drv->pm) { | 653 | if (drv && drv->pm) { |
652 | if (drv->pm->restore) | 654 | if (drv->pm->restore) |
653 | error = drv->pm->restore(dev); | 655 | error = drv->pm->restore(dev); |
@@ -656,7 +658,6 @@ static int pci_pm_restore(struct device *dev) | |||
656 | } else { | 658 | } else { |
657 | error = pci_default_pm_resume_late(pci_dev); | 659 | error = pci_default_pm_resume_late(pci_dev); |
658 | } | 660 | } |
659 | pci_fixup_device(pci_fixup_resume, pci_dev); | ||
660 | 661 | ||
661 | return error; | 662 | return error; |
662 | } | 663 | } |
@@ -667,7 +668,7 @@ static int pci_pm_restore_noirq(struct device *dev) | |||
667 | struct device_driver *drv = dev->driver; | 668 | struct device_driver *drv = dev->driver; |
668 | int error = 0; | 669 | int error = 0; |
669 | 670 | ||
670 | pci_fixup_device(pci_fixup_resume, pci_dev); | 671 | pci_fixup_device(pci_fixup_resume_early, pci_dev); |
671 | 672 | ||
672 | if (drv && drv->pm) { | 673 | if (drv && drv->pm) { |
673 | if (drv->pm->restore_noirq) | 674 | if (drv->pm->restore_noirq) |
@@ -677,7 +678,6 @@ static int pci_pm_restore_noirq(struct device *dev) | |||
677 | } else { | 678 | } else { |
678 | pci_default_pm_resume_early(pci_dev); | 679 | pci_default_pm_resume_early(pci_dev); |
679 | } | 680 | } |
680 | pci_fixup_device(pci_fixup_resume_early, pci_dev); | ||
681 | 681 | ||
682 | return error; | 682 | return error; |
683 | } | 683 | } |