diff options
Diffstat (limited to 'drivers/pci/pci-driver.c')
-rw-r--r-- | drivers/pci/pci-driver.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index f99bc7f089f1..a7eb7277b106 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c | |||
@@ -575,7 +575,7 @@ static void pci_pm_complete(struct device *dev) | |||
575 | static int pci_pm_suspend(struct device *dev) | 575 | static int pci_pm_suspend(struct device *dev) |
576 | { | 576 | { |
577 | struct pci_dev *pci_dev = to_pci_dev(dev); | 577 | struct pci_dev *pci_dev = to_pci_dev(dev); |
578 | struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; | 578 | const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; |
579 | 579 | ||
580 | if (pci_has_legacy_pm_support(pci_dev)) | 580 | if (pci_has_legacy_pm_support(pci_dev)) |
581 | return pci_legacy_suspend(dev, PMSG_SUSPEND); | 581 | return pci_legacy_suspend(dev, PMSG_SUSPEND); |
@@ -613,7 +613,7 @@ static int pci_pm_suspend(struct device *dev) | |||
613 | static int pci_pm_suspend_noirq(struct device *dev) | 613 | static int pci_pm_suspend_noirq(struct device *dev) |
614 | { | 614 | { |
615 | struct pci_dev *pci_dev = to_pci_dev(dev); | 615 | struct pci_dev *pci_dev = to_pci_dev(dev); |
616 | struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; | 616 | const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; |
617 | 617 | ||
618 | if (pci_has_legacy_pm_support(pci_dev)) | 618 | if (pci_has_legacy_pm_support(pci_dev)) |
619 | return pci_legacy_suspend_late(dev, PMSG_SUSPEND); | 619 | return pci_legacy_suspend_late(dev, PMSG_SUSPEND); |
@@ -672,7 +672,7 @@ static int pci_pm_resume_noirq(struct device *dev) | |||
672 | static int pci_pm_resume(struct device *dev) | 672 | static int pci_pm_resume(struct device *dev) |
673 | { | 673 | { |
674 | struct pci_dev *pci_dev = to_pci_dev(dev); | 674 | struct pci_dev *pci_dev = to_pci_dev(dev); |
675 | struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; | 675 | const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; |
676 | int error = 0; | 676 | int error = 0; |
677 | 677 | ||
678 | /* | 678 | /* |
@@ -711,7 +711,7 @@ static int pci_pm_resume(struct device *dev) | |||
711 | static int pci_pm_freeze(struct device *dev) | 711 | static int pci_pm_freeze(struct device *dev) |
712 | { | 712 | { |
713 | struct pci_dev *pci_dev = to_pci_dev(dev); | 713 | struct pci_dev *pci_dev = to_pci_dev(dev); |
714 | struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; | 714 | const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; |
715 | 715 | ||
716 | if (pci_has_legacy_pm_support(pci_dev)) | 716 | if (pci_has_legacy_pm_support(pci_dev)) |
717 | return pci_legacy_suspend(dev, PMSG_FREEZE); | 717 | return pci_legacy_suspend(dev, PMSG_FREEZE); |
@@ -780,7 +780,7 @@ static int pci_pm_thaw_noirq(struct device *dev) | |||
780 | static int pci_pm_thaw(struct device *dev) | 780 | static int pci_pm_thaw(struct device *dev) |
781 | { | 781 | { |
782 | struct pci_dev *pci_dev = to_pci_dev(dev); | 782 | struct pci_dev *pci_dev = to_pci_dev(dev); |
783 | struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; | 783 | const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; |
784 | int error = 0; | 784 | int error = 0; |
785 | 785 | ||
786 | if (pci_has_legacy_pm_support(pci_dev)) | 786 | if (pci_has_legacy_pm_support(pci_dev)) |
@@ -799,7 +799,7 @@ static int pci_pm_thaw(struct device *dev) | |||
799 | static int pci_pm_poweroff(struct device *dev) | 799 | static int pci_pm_poweroff(struct device *dev) |
800 | { | 800 | { |
801 | struct pci_dev *pci_dev = to_pci_dev(dev); | 801 | struct pci_dev *pci_dev = to_pci_dev(dev); |
802 | struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; | 802 | const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; |
803 | 803 | ||
804 | if (pci_has_legacy_pm_support(pci_dev)) | 804 | if (pci_has_legacy_pm_support(pci_dev)) |
805 | return pci_legacy_suspend(dev, PMSG_HIBERNATE); | 805 | return pci_legacy_suspend(dev, PMSG_HIBERNATE); |
@@ -872,7 +872,7 @@ static int pci_pm_restore_noirq(struct device *dev) | |||
872 | static int pci_pm_restore(struct device *dev) | 872 | static int pci_pm_restore(struct device *dev) |
873 | { | 873 | { |
874 | struct pci_dev *pci_dev = to_pci_dev(dev); | 874 | struct pci_dev *pci_dev = to_pci_dev(dev); |
875 | struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; | 875 | const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; |
876 | int error = 0; | 876 | int error = 0; |
877 | 877 | ||
878 | /* | 878 | /* |
@@ -910,7 +910,7 @@ static int pci_pm_restore(struct device *dev) | |||
910 | 910 | ||
911 | #endif /* !CONFIG_HIBERNATION */ | 911 | #endif /* !CONFIG_HIBERNATION */ |
912 | 912 | ||
913 | struct dev_pm_ops pci_dev_pm_ops = { | 913 | const struct dev_pm_ops pci_dev_pm_ops = { |
914 | .prepare = pci_pm_prepare, | 914 | .prepare = pci_pm_prepare, |
915 | .complete = pci_pm_complete, | 915 | .complete = pci_pm_complete, |
916 | .suspend = pci_pm_suspend, | 916 | .suspend = pci_pm_suspend, |