diff options
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r-- | drivers/pci/pci.c | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 5cb5820fae40..0c4f641b7be1 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -450,7 +450,7 @@ static struct pci_platform_pm_ops *pci_platform_pm; | |||
450 | int pci_set_platform_pm(struct pci_platform_pm_ops *ops) | 450 | int pci_set_platform_pm(struct pci_platform_pm_ops *ops) |
451 | { | 451 | { |
452 | if (!ops->is_manageable || !ops->set_state || !ops->choose_state | 452 | if (!ops->is_manageable || !ops->set_state || !ops->choose_state |
453 | || !ops->sleep_wake || !ops->can_wakeup) | 453 | || !ops->sleep_wake) |
454 | return -EINVAL; | 454 | return -EINVAL; |
455 | pci_platform_pm = ops; | 455 | pci_platform_pm = ops; |
456 | return 0; | 456 | return 0; |
@@ -473,11 +473,6 @@ static inline pci_power_t platform_pci_choose_state(struct pci_dev *dev) | |||
473 | pci_platform_pm->choose_state(dev) : PCI_POWER_ERROR; | 473 | pci_platform_pm->choose_state(dev) : PCI_POWER_ERROR; |
474 | } | 474 | } |
475 | 475 | ||
476 | static inline bool platform_pci_can_wakeup(struct pci_dev *dev) | ||
477 | { | ||
478 | return pci_platform_pm ? pci_platform_pm->can_wakeup(dev) : false; | ||
479 | } | ||
480 | |||
481 | static inline int platform_pci_sleep_wake(struct pci_dev *dev, bool enable) | 476 | static inline int platform_pci_sleep_wake(struct pci_dev *dev, bool enable) |
482 | { | 477 | { |
483 | return pci_platform_pm ? | 478 | return pci_platform_pm ? |
@@ -1985,25 +1980,6 @@ void pci_pm_init(struct pci_dev *dev) | |||
1985 | } | 1980 | } |
1986 | } | 1981 | } |
1987 | 1982 | ||
1988 | /** | ||
1989 | * platform_pci_wakeup_init - init platform wakeup if present | ||
1990 | * @dev: PCI device | ||
1991 | * | ||
1992 | * Some devices don't have PCI PM caps but can still generate wakeup | ||
1993 | * events through platform methods (like ACPI events). If @dev supports | ||
1994 | * platform wakeup events, set the device flag to indicate as much. This | ||
1995 | * may be redundant if the device also supports PCI PM caps, but double | ||
1996 | * initialization should be safe in that case. | ||
1997 | */ | ||
1998 | void platform_pci_wakeup_init(struct pci_dev *dev) | ||
1999 | { | ||
2000 | if (!platform_pci_can_wakeup(dev)) | ||
2001 | return; | ||
2002 | |||
2003 | device_set_wakeup_capable(&dev->dev, true); | ||
2004 | platform_pci_sleep_wake(dev, false); | ||
2005 | } | ||
2006 | |||
2007 | static void pci_add_saved_cap(struct pci_dev *pci_dev, | 1983 | static void pci_add_saved_cap(struct pci_dev *pci_dev, |
2008 | struct pci_cap_saved_state *new_cap) | 1984 | struct pci_cap_saved_state *new_cap) |
2009 | { | 1985 | { |