diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-08-11 02:31:54 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-08-18 02:53:32 +0300 |
commit | 7db8d1d904e4b64d0d8e2bce75b59f59d445e1e2 (patch) | |
tree | 97221ca5f8506568897a85120e5707c78a3414bc /drivers | |
parent | a042e0c62b38e7bb8b5edadc46c2ff23d1091111 (diff) | |
download | linux-7db8d1d904e4b64d0d8e2bce75b59f59d445e1e2.tar.xz |
ACPI: Add debug statements to acpi_global_event_handler()
It sometimes is useful to examine the timing of ACPI events during
certain operations only, like during system suspend/resume, so add
pr_debug() statements for that to acpi_global_event_handler().
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/sysfs.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c index e414fabf7315..32d7e43b64c4 100644 --- a/drivers/acpi/sysfs.c +++ b/drivers/acpi/sysfs.c @@ -2,6 +2,8 @@ * sysfs.c - ACPI sysfs interface to userspace. */ +#define pr_fmt(fmt) "ACPI: " fmt + #include <linux/init.h> #include <linux/kernel.h> #include <linux/moduleparam.h> @@ -552,11 +554,15 @@ static void fixed_event_count(u32 event_number) static void acpi_global_event_handler(u32 event_type, acpi_handle device, u32 event_number, void *context) { - if (event_type == ACPI_EVENT_TYPE_GPE) + if (event_type == ACPI_EVENT_TYPE_GPE) { gpe_count(event_number); - - if (event_type == ACPI_EVENT_TYPE_FIXED) + pr_debug("GPE event 0x%02x\n", event_number); + } else if (event_type == ACPI_EVENT_TYPE_FIXED) { fixed_event_count(event_number); + pr_debug("Fixed event 0x%02x\n", event_number); + } else { + pr_debug("Other event 0x%02x\n", event_number); + } } static int get_status(u32 index, acpi_event_status *status, |