]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
sony-laptop: add some debug printk useful for bug reports
authorMattia Dongili <malattia@linux.it>
Sat, 19 Feb 2011 02:52:25 +0000 (11:52 +0900)
committerMatthew Garrett <mjg@redhat.com>
Mon, 28 Mar 2011 10:05:23 +0000 (06:05 -0400)
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
drivers/platform/x86/sony-laptop.c

index 13d8d63bcca9ef7cf307860a72f9b94c06466ed8..5cd39af376d95a5d5ca1b9622db13e4cdf4852a8 100644 (file)
@@ -733,22 +733,30 @@ static int sony_find_snc_handle(int handle)
 
        for (i = 0x20; i < 0x30; i++) {
                acpi_callsetfunc(sony_nc_acpi_handle, "SN00", i, &result);
-               if (result == handle)
+               if (result == handle) {
+                       dprintk("found handle 0x%.4x (offset: 0x%.2x)\n",
+                                       handle, i - 0x20);
                        return i-0x20;
+               }
        }
 
+       dprintk("handle 0x%.4x not found\n", handle);
        return -1;
 }
 
 static int sony_call_snc_handle(int handle, int argument, int *result)
 {
+       int ret = 0;
        int offset = sony_find_snc_handle(handle);
 
        if (offset < 0)
                return -1;
 
-       return acpi_callsetfunc(sony_nc_acpi_handle, "SN07", offset | argument,
-                               result);
+       ret = acpi_callsetfunc(sony_nc_acpi_handle, "SN07", offset | argument,
+                       result);
+       dprintk("called SN07 with 0x%.4x (result: 0x%.4x)\n", offset | argument,
+                       *result);
+       return ret;
 }
 
 /*