diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2013-01-10 13:18:41 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2013-01-10 13:18:41 -0500 |
commit | 295a7f6235bfa21be3454aebc1bea1eaf0b74fb7 (patch) | |
tree | ae253b12eb331e1d093a3f348b4f8045e80f5e53 /drivers/pci/pci.c | |
parent | b3e65e1f9185a2eb034defe4270ba178ba70b9a9 (diff) | |
parent | f95988de06ea62ef5bd861f06e9ef56cea405ed1 (diff) |
Merge branch 'acpi-scan' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm into pci/yinghai-survey-resources+acpi-scan
* 'acpi-scan' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
ACPI / scan: Treat power resources in a special way
ACPI: Remove unused struct acpi_pci_root.id member
ACPI: Drop ACPI device .bind() and .unbind() callbacks
ACPI / PCI: Move the _PRT setup and cleanup code to pci-acpi.c
ACPI / PCI: Rework the setup and cleanup of device wakeup
ACPI: Add .setup() and .cleanup() callbacks to struct acpi_bus_type
ACPI: Make acpi_bus_scan() and acpi_bus_add() take only one argument
ACPI: Replace ACPI device add_type field with a match_driver flag
ACPI: Drop the second argument of acpi_bus_scan()
ACPI: Remove the arguments of acpi_bus_add() that are not used
ACPI: Remove acpi_start_single_object() and acpi_bus_start()
ACPI / PCI: Fold acpi_pci_root_start() into acpi_pci_root_add()
ACPI: Change the ordering of acpi_bus_check_add()
ACPI: Replace struct acpi_bus_ops with enum type
ACPI: Reduce the usage of struct acpi_bus_ops
ACPI: Make acpi_bus_add() and acpi_bus_start() visibly different
ACPI: Change the ordering of PCI root bridge driver registrarion
ACPI: Separate adding ACPI device objects from probing ACPI drivers
Conflicts:
drivers/acpi/pci_root.c
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 | { |