diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-16 10:49:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-16 10:49:54 -0400 |
commit | 4406c56d0a4da7a37b9180abeaece6cd00bcc874 (patch) | |
tree | 65a85fa73a25d24cbed6d163fdcf8df1b934a0be /drivers/acpi/sleep.c | |
parent | 6b7b352f2102e21f9d8f38e932f01d9c5705c073 (diff) | |
parent | 5e3573db2bd5db6925159279d99576a4635bdb66 (diff) |
Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
* 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (75 commits)
PCI hotplug: clean up acpi_run_hpp()
PCI hotplug: acpiphp: use generic pci_configure_slot()
PCI hotplug: shpchp: use generic pci_configure_slot()
PCI hotplug: pciehp: use generic pci_configure_slot()
PCI hotplug: add pci_configure_slot()
PCI hotplug: clean up acpi_get_hp_params_from_firmware() interface
PCI hotplug: acpiphp: don't cache hotplug_params in acpiphp_bridge
PCI hotplug: acpiphp: remove superfluous _HPP/_HPX evaluation
PCI: Clear saved_state after the state has been restored
PCI PM: Return error codes from pci_pm_resume()
PCI: use dev_printk in quirk messages
PCI / PCIe portdrv: Fix pcie_portdrv_slot_reset()
PCI Hotplug: convert acpi_pci_detect_ejectable() to take an acpi_handle
PCI Hotplug: acpiphp: find bridges the easy way
PCI: pcie portdrv: remove unused variable
PCI / ACPI PM: Propagate wake-up enable for devices w/o ACPI support
ACPI PM: Replace wakeup.prepared with reference counter
PCI PM: Introduce device flag wakeup_prepared
PCI / ACPI PM: Rework some debug messages
PCI PM: Simplify PCI wake-up code
...
Fixed up conflict in arch/powerpc/kernel/pci_64.c due to OF device tree
scanning having been moved and merged for the 32- and 64-bit cases. The
'needs_freset' initialization added in 6e19314cc ("PCI/powerpc: support
PCIe fundamental reset") is now in arch/powerpc/kernel/pci_of_scan.c.
Diffstat (limited to 'drivers/acpi/sleep.c')
-rw-r--r-- | drivers/acpi/sleep.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index 42159a28f433..feece693d773 100644 --- a/drivers/acpi/sleep.c +++ b/drivers/acpi/sleep.c | |||
@@ -689,19 +689,25 @@ int acpi_pm_device_sleep_wake(struct device *dev, bool enable) | |||
689 | { | 689 | { |
690 | acpi_handle handle; | 690 | acpi_handle handle; |
691 | struct acpi_device *adev; | 691 | struct acpi_device *adev; |
692 | int error; | ||
692 | 693 | ||
693 | if (!device_may_wakeup(dev)) | 694 | if (!device_can_wakeup(dev)) |
694 | return -EINVAL; | 695 | return -EINVAL; |
695 | 696 | ||
696 | handle = DEVICE_ACPI_HANDLE(dev); | 697 | handle = DEVICE_ACPI_HANDLE(dev); |
697 | if (!handle || ACPI_FAILURE(acpi_bus_get_device(handle, &adev))) { | 698 | if (!handle || ACPI_FAILURE(acpi_bus_get_device(handle, &adev))) { |
698 | printk(KERN_DEBUG "ACPI handle has no context!\n"); | 699 | dev_dbg(dev, "ACPI handle has no context in %s!\n", __func__); |
699 | return -ENODEV; | 700 | return -ENODEV; |
700 | } | 701 | } |
701 | 702 | ||
702 | return enable ? | 703 | error = enable ? |
703 | acpi_enable_wakeup_device_power(adev, acpi_target_sleep_state) : | 704 | acpi_enable_wakeup_device_power(adev, acpi_target_sleep_state) : |
704 | acpi_disable_wakeup_device_power(adev); | 705 | acpi_disable_wakeup_device_power(adev); |
706 | if (!error) | ||
707 | dev_info(dev, "wake-up capability %s by ACPI\n", | ||
708 | enable ? "enabled" : "disabled"); | ||
709 | |||
710 | return error; | ||
705 | } | 711 | } |
706 | #endif | 712 | #endif |
707 | 713 | ||