[PATCH] ACPI: Update CONFIG_ACPI_SCI_EMULATE patch

From: Toshi Kani
Date: Thu Sep 13 2012 - 19:45:38 EST


---
drivers/acpi/sci_emu.c | 47 +++++++++++++++--------------------------------
1 files changed, 15 insertions(+), 32 deletions(-)

diff --git a/drivers/acpi/sci_emu.c b/drivers/acpi/sci_emu.c
index 2f13ca1..efa0f6a 100644
--- a/drivers/acpi/sci_emu.c
+++ b/drivers/acpi/sci_emu.c
@@ -23,16 +23,12 @@ static struct dentry *sci_notify_dentry;
static void sci_notify_client(char *acpi_name, u32 event)
{
struct acpi_namespace_node *node;
- acpi_status status, status1;
- acpi_handle hlsb, hsb;
- union acpi_operand_object *obj_desc;
-
- status = acpi_get_handle(NULL, "\\_SB", &hsb);
- status1 = acpi_get_handle(hsb, acpi_name, &hlsb);
- if (ACPI_FAILURE(status) || ACPI_FAILURE(status1)) {
- pr_err(PREFIX
- "acpi getting handle to <\\_SB.%s> failed inside notify_client\n",
- acpi_name);
+ acpi_status status;
+ acpi_handle handle;
+
+ status = acpi_get_handle(NULL, acpi_name, &handle);
+ if (ACPI_FAILURE(status)) {
+ pr_err(PREFIX "Invalid ACPI device name <%s>\n", acpi_name);
return;
}

@@ -42,7 +38,7 @@ static void sci_notify_client(char *acpi_name, u32 event)
return;
}

- node = acpi_ns_validate_handle(hlsb);
+ node = acpi_ns_validate_handle(handle);
if (!node) {
acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
pr_err(PREFIX "Mapping handle to node failed\n");
@@ -50,29 +46,16 @@ static void sci_notify_client(char *acpi_name, u32 event)
}

/*
- * Check for internal object and make sure there is a handler
- * registered for this object
+ * Release the lock and queue the item for later
+ * exectuion
*/
- obj_desc = acpi_ns_get_attached_object(node);
- if (obj_desc) {
- if (obj_desc->common_notify.notify_list[0]) {
- /*
- * Release the lock and queue the item for later
- * exectuion
- */
- acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
- status = acpi_ev_queue_notify_request(node, event);
- if (ACPI_FAILURE(status))
- pr_err(PREFIX "acpi_ev_queue_notify_request failed\n");
- else
- pr_info(PREFIX "Notify event is queued\n");
- return;
- }
- } else {
- pr_info(PREFIX "Notify handler not registered for this device\n");
- }
-
acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
+ status = acpi_ev_queue_notify_request(node, event);
+ if (ACPI_FAILURE(status))
+ pr_err(PREFIX "acpi_ev_queue_notify_request failed\n");
+ else
+ pr_info(PREFIX "Notify event is queued\n");
+
return;
}

--
1.7.7.6


--=-9GC13nXKRrnpgBHzmF7/--

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/