From df8db91fc3b543d373afa61beef35b072eea1368 Mon Sep 17 00:00:00 2001 From: "Rafael J. Wysocki" Date: Tue, 8 Sep 2009 23:13:49 +0200 Subject: 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 Signed-off-by: Rafael J. Wysocki Signed-off-by: Jesse Barnes --- drivers/acpi/sleep.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'drivers/acpi') diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index 42159a2..ab889be 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) { acpi_handle handle; struct acpi_device *adev; + int error; if (!device_may_wakeup(dev)) return -EINVAL; handle = DEVICE_ACPI_HANDLE(dev); if (!handle || ACPI_FAILURE(acpi_bus_get_device(handle, &adev))) { - printk(KERN_DEBUG "ACPI handle has no context!\n"); + dev_dbg(dev, "ACPI handle has no context in %s!\n", __func__); return -ENODEV; } - return enable ? + error = enable ? acpi_enable_wakeup_device_power(adev, acpi_target_sleep_state) : acpi_disable_wakeup_device_power(adev); + if (!error) + dev_info(dev, "wake-up capability %s by ACPI\n", + enable ? "enabled" : "disabled"); + + return error; } #endif -- cgit v1.1