aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/sleep.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2009-09-08 17:13:49 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-09-09 17:19:06 -0400
commitdf8db91fc3b543d373afa61beef35b072eea1368 (patch)
tree969c172b1a301e55365668f1e7e6ba0a7e3a0818 /drivers/acpi/sleep.c
parent5bcc2fb4e8157d829a38093b98e23329ac8acff7 (diff)
PCI / ACPI PM: Rework some debug messages
Move a debug message from acpi_pci_sleep_wake() to acpi_pm_device_sleep_wake() and use the standard dev_*() macros in there. Reviewed-by: Matthew Garrett <mjg59@srcf.ucam.org> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/acpi/sleep.c')
-rw-r--r--drivers/acpi/sleep.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index 42159a28f433..ab889becd3f3 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_may_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