diff options
Diffstat (limited to 'drivers/pci/pci-driver.c')
-rw-r--r-- | drivers/pci/pci-driver.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index 8a6f797de8e5..46767c53917a 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c | |||
@@ -338,7 +338,7 @@ static int pci_call_probe(struct pci_driver *drv, struct pci_dev *dev, | |||
338 | } | 338 | } |
339 | 339 | ||
340 | /** | 340 | /** |
341 | * __pci_device_probe() | 341 | * __pci_device_probe - check if a driver wants to claim a specific PCI device |
342 | * @drv: driver to call to check if it wants the PCI device | 342 | * @drv: driver to call to check if it wants the PCI device |
343 | * @pci_dev: PCI device being probed | 343 | * @pci_dev: PCI device being probed |
344 | * | 344 | * |
@@ -431,7 +431,7 @@ static void pci_device_shutdown(struct device *dev) | |||
431 | pci_msix_shutdown(pci_dev); | 431 | pci_msix_shutdown(pci_dev); |
432 | } | 432 | } |
433 | 433 | ||
434 | #ifdef CONFIG_PM_OPS | 434 | #ifdef CONFIG_PM |
435 | 435 | ||
436 | /* Auxiliary functions used for system resume and run-time resume. */ | 436 | /* Auxiliary functions used for system resume and run-time resume. */ |
437 | 437 | ||
@@ -449,7 +449,8 @@ static int pci_restore_standard_config(struct pci_dev *pci_dev) | |||
449 | return error; | 449 | return error; |
450 | } | 450 | } |
451 | 451 | ||
452 | return pci_restore_state(pci_dev); | 452 | pci_restore_state(pci_dev); |
453 | return 0; | ||
453 | } | 454 | } |
454 | 455 | ||
455 | static void pci_pm_default_resume_early(struct pci_dev *pci_dev) | 456 | static void pci_pm_default_resume_early(struct pci_dev *pci_dev) |
@@ -623,7 +624,7 @@ static int pci_pm_prepare(struct device *dev) | |||
623 | * system from the sleep state, we'll have to prevent it from signaling | 624 | * system from the sleep state, we'll have to prevent it from signaling |
624 | * wake-up. | 625 | * wake-up. |
625 | */ | 626 | */ |
626 | pm_runtime_resume(dev); | 627 | pm_runtime_get_sync(dev); |
627 | 628 | ||
628 | if (drv && drv->pm && drv->pm->prepare) | 629 | if (drv && drv->pm && drv->pm->prepare) |
629 | error = drv->pm->prepare(dev); | 630 | error = drv->pm->prepare(dev); |
@@ -637,6 +638,8 @@ static void pci_pm_complete(struct device *dev) | |||
637 | 638 | ||
638 | if (drv && drv->pm && drv->pm->complete) | 639 | if (drv && drv->pm && drv->pm->complete) |
639 | drv->pm->complete(dev); | 640 | drv->pm->complete(dev); |
641 | |||
642 | pm_runtime_put_sync(dev); | ||
640 | } | 643 | } |
641 | 644 | ||
642 | #else /* !CONFIG_PM_SLEEP */ | 645 | #else /* !CONFIG_PM_SLEEP */ |
@@ -780,7 +783,7 @@ static int pci_pm_resume(struct device *dev) | |||
780 | 783 | ||
781 | #endif /* !CONFIG_SUSPEND */ | 784 | #endif /* !CONFIG_SUSPEND */ |
782 | 785 | ||
783 | #ifdef CONFIG_HIBERNATION | 786 | #ifdef CONFIG_HIBERNATE_CALLBACKS |
784 | 787 | ||
785 | static int pci_pm_freeze(struct device *dev) | 788 | static int pci_pm_freeze(struct device *dev) |
786 | { | 789 | { |
@@ -969,7 +972,7 @@ static int pci_pm_restore(struct device *dev) | |||
969 | return error; | 972 | return error; |
970 | } | 973 | } |
971 | 974 | ||
972 | #else /* !CONFIG_HIBERNATION */ | 975 | #else /* !CONFIG_HIBERNATE_CALLBACKS */ |
973 | 976 | ||
974 | #define pci_pm_freeze NULL | 977 | #define pci_pm_freeze NULL |
975 | #define pci_pm_freeze_noirq NULL | 978 | #define pci_pm_freeze_noirq NULL |
@@ -980,7 +983,7 @@ static int pci_pm_restore(struct device *dev) | |||
980 | #define pci_pm_restore NULL | 983 | #define pci_pm_restore NULL |
981 | #define pci_pm_restore_noirq NULL | 984 | #define pci_pm_restore_noirq NULL |
982 | 985 | ||
983 | #endif /* !CONFIG_HIBERNATION */ | 986 | #endif /* !CONFIG_HIBERNATE_CALLBACKS */ |
984 | 987 | ||
985 | #ifdef CONFIG_PM_RUNTIME | 988 | #ifdef CONFIG_PM_RUNTIME |
986 | 989 | ||
@@ -1058,7 +1061,7 @@ static int pci_pm_runtime_idle(struct device *dev) | |||
1058 | 1061 | ||
1059 | #endif /* !CONFIG_PM_RUNTIME */ | 1062 | #endif /* !CONFIG_PM_RUNTIME */ |
1060 | 1063 | ||
1061 | #ifdef CONFIG_PM_OPS | 1064 | #ifdef CONFIG_PM |
1062 | 1065 | ||
1063 | const struct dev_pm_ops pci_dev_pm_ops = { | 1066 | const struct dev_pm_ops pci_dev_pm_ops = { |
1064 | .prepare = pci_pm_prepare, | 1067 | .prepare = pci_pm_prepare, |