ACPI / EC: Refine event/query debugging messages.

This patch refines event/query debugging messages to use a unified format
as commands. Developers can clearly find different processes by checking
different log seperators. No functional changes.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
Lv Zheng 2014-10-14 14:23:55 +08:00 committed by Rafael J. Wysocki
parent e34c0e2bb4
commit d3090b6a6c
1 changed files with 8 additions and 6 deletions

View File

@ -332,8 +332,10 @@ static int acpi_ec_transaction_unlocked(struct acpi_ec *ec,
spin_unlock_irqrestore(&ec->lock, tmp); spin_unlock_irqrestore(&ec->lock, tmp);
ret = ec_poll(ec); ret = ec_poll(ec);
spin_lock_irqsave(&ec->lock, tmp); spin_lock_irqsave(&ec->lock, tmp);
if (ec->curr->command == ACPI_EC_COMMAND_QUERY) if (ec->curr->command == ACPI_EC_COMMAND_QUERY) {
clear_bit(EC_FLAGS_QUERY_PENDING, &ec->flags); clear_bit(EC_FLAGS_QUERY_PENDING, &ec->flags);
pr_debug("***** Event stopped *****\n");
}
pr_debug("***** Command(%s) stopped *****\n", pr_debug("***** Command(%s) stopped *****\n",
acpi_ec_cmd_string(t->command)); acpi_ec_cmd_string(t->command));
ec->curr = NULL; ec->curr = NULL;
@ -617,12 +619,12 @@ static void acpi_ec_run(void *cxt)
struct acpi_ec_query_handler *handler = cxt; struct acpi_ec_query_handler *handler = cxt;
if (!handler) if (!handler)
return; return;
pr_debug("start query execution\n"); pr_debug("##### Query(0x%02x) started #####\n", handler->query_bit);
if (handler->func) if (handler->func)
handler->func(handler->data); handler->func(handler->data);
else if (handler->handle) else if (handler->handle)
acpi_evaluate_object(handler->handle, NULL, NULL, NULL); acpi_evaluate_object(handler->handle, NULL, NULL, NULL);
pr_debug("stop query execution\n"); pr_debug("##### Query(0x%02x) stopped #####\n", handler->query_bit);
kfree(handler); kfree(handler);
} }
@ -645,8 +647,8 @@ static int acpi_ec_sync_query(struct acpi_ec *ec, u8 *data)
if (!copy) if (!copy)
return -ENOMEM; return -ENOMEM;
memcpy(copy, handler, sizeof(*copy)); memcpy(copy, handler, sizeof(*copy));
pr_debug("push query execution (0x%2x) on queue\n", pr_debug("##### Query(0x%02x) scheduled #####\n",
value); handler->query_bit);
return acpi_os_execute((copy->func) ? return acpi_os_execute((copy->func) ?
OSL_NOTIFY_HANDLER : OSL_GPE_HANDLER, OSL_NOTIFY_HANDLER : OSL_GPE_HANDLER,
acpi_ec_run, copy); acpi_ec_run, copy);
@ -669,7 +671,7 @@ static int ec_check_sci(struct acpi_ec *ec, u8 state)
{ {
if (state & ACPI_EC_FLAG_SCI) { if (state & ACPI_EC_FLAG_SCI) {
if (!test_and_set_bit(EC_FLAGS_QUERY_PENDING, &ec->flags)) { if (!test_and_set_bit(EC_FLAGS_QUERY_PENDING, &ec->flags)) {
pr_debug("push gpe query to the queue\n"); pr_debug("***** Event started *****\n");
return acpi_os_execute(OSL_NOTIFY_HANDLER, return acpi_os_execute(OSL_NOTIFY_HANDLER,
acpi_ec_gpe_query, ec); acpi_ec_gpe_query, ec);
} }