summaryrefslogtreecommitdiff
path: root/drivers/platform/x86/sony-laptop.c
diff options
context:
space:
mode:
authorMattia Dongili <malattia@linux.it>2011-02-19 05:52:25 +0300
committerMatthew Garrett <mjg@redhat.com>2011-03-28 14:05:23 +0400
commit56e6e716b5211f4cda8db63b9a16d083ee193480 (patch)
tree63f2454092607b7f7c1fb4c9f039feda3d17e7c3 /drivers/platform/x86/sony-laptop.c
parent80887757e304d1f973330d9398024cffcd82d00d (diff)
downloadlinux-56e6e716b5211f4cda8db63b9a16d083ee193480.tar.xz
sony-laptop: add some debug printk useful for bug reports
Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Diffstat (limited to 'drivers/platform/x86/sony-laptop.c')
-rw-r--r--drivers/platform/x86/sony-laptop.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c
index 13d8d63bcca9..5cd39af376d9 100644
--- a/drivers/platform/x86/sony-laptop.c
+++ b/drivers/platform/x86/sony-laptop.c
@@ -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;
}
/*