Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9254bc845db90a123cf992e983539d0ee409f22a
Commit:     9254bc845db90a123cf992e983539d0ee409f22a
Parent:     3f8698d4d3f72252980575fb8d7b4cafeb5dd0a2
Author:     Dmitry Torokhov <[EMAIL PROTECTED]>
AuthorDate: Wed Jul 18 01:10:24 2007 -0400
Committer:  Len Brown <[EMAIL PROTECTED]>
CommitDate: Wed Jul 18 20:37:06 2007 -0400

    ACPI: dock: fix oops when _DCK evaluation fails
    
    Data returned by acpi_get_name in acpi_buffer is not acpi_object and
    therefore should not be cast to it, otherwise we'll get an nice oops
    trying to print error message.
    
    Also print name of the ACPI object corresponding to the docking station
    and elevate severity of the message printed when _DCK fails to KERN_ERR.
    
    Signed-off-by: Dmitry Torokhov <[EMAIL PROTECTED]>
    Cc: Kristen Carlson Accardi <[EMAIL PROTECTED]>
    Signed-off-by: Len Brown <[EMAIL PROTECTED]>
---
 drivers/acpi/dock.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c
index dc3df93..6192c8b 100644
--- a/drivers/acpi/dock.c
+++ b/drivers/acpi/dock.c
@@ -396,12 +396,11 @@ static void handle_dock(struct dock_station *ds, int dock)
        union acpi_object arg;
        struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
        struct acpi_buffer name_buffer = { ACPI_ALLOCATE_BUFFER, NULL };
-       union acpi_object *obj;
 
        acpi_get_name(ds->handle, ACPI_FULL_PATHNAME, &name_buffer);
-       obj = name_buffer.pointer;
 
-       printk(KERN_INFO PREFIX "%s\n", dock ? "docking" : "undocking");
+       printk(KERN_INFO PREFIX "%s - %s\n",
+               (char *)name_buffer.pointer, dock ? "docking" : "undocking");
 
        /* _DCK method has one argument */
        arg_list.count = 1;
@@ -410,7 +409,8 @@ static void handle_dock(struct dock_station *ds, int dock)
        arg.integer.value = dock;
        status = acpi_evaluate_object(ds->handle, "_DCK", &arg_list, &buffer);
        if (ACPI_FAILURE(status))
-               pr_debug("%s: failed to execute _DCK\n", obj->string.pointer);
+               printk(KERN_ERR PREFIX "%s - failed to execute _DCK\n",
+                        (char *)name_buffer.pointer);
        kfree(buffer.pointer);
        kfree(name_buffer.pointer);
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to