提交 30c08574 编写于 作者: A Alexey Starikovskiy 提交者: Len Brown

ACPI: EC: Add new query handler to list head.

Signed-off-by: NAlexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: NLen Brown <len.brown@intel.com>
上级 8db85d4c
...@@ -425,7 +425,7 @@ int acpi_ec_add_query_handler(struct acpi_ec *ec, u8 query_bit, ...@@ -425,7 +425,7 @@ int acpi_ec_add_query_handler(struct acpi_ec *ec, u8 query_bit,
handler->func = func; handler->func = func;
handler->data = data; handler->data = data;
mutex_lock(&ec->lock); mutex_lock(&ec->lock);
list_add_tail(&handler->node, &ec->list); list_add(&handler->node, &ec->list);
mutex_unlock(&ec->lock); mutex_unlock(&ec->lock);
return 0; return 0;
} }
...@@ -440,7 +440,6 @@ void acpi_ec_remove_query_handler(struct acpi_ec *ec, u8 query_bit) ...@@ -440,7 +440,6 @@ void acpi_ec_remove_query_handler(struct acpi_ec *ec, u8 query_bit)
if (query_bit == handler->query_bit) { if (query_bit == handler->query_bit) {
list_del(&handler->node); list_del(&handler->node);
kfree(handler); kfree(handler);
break;
} }
} }
mutex_unlock(&ec->lock); mutex_unlock(&ec->lock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册