ACPI: PM: Print debug messages when enabling GPEs for wakeup
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 3 Apr 2019 21:58:01 +0000 (23:58 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 8 Apr 2019 10:54:25 +0000 (12:54 +0200)
In sufficiently complicated GPE configurations it is hard to
determine which GPE could be the source of system wakeup from a sleep
state, so make __acpi_device_wakeup_enable() print that information
to the kernel log if debugging is enabled.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/device_pm.c

index 824ae98..5b50f88 100644 (file)
@@ -728,6 +728,9 @@ static int __acpi_device_wakeup_enable(struct acpi_device *adev,
                goto out;
        }
 
+       acpi_handle_debug(adev->handle, "GPE%2X enabled for wakeup\n",
+                         (unsigned int)wakeup->gpe_number);
+
 inc:
        wakeup->enable_count++;