Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 243084
b: refs/heads/master
c: 56e6e71
h: refs/heads/master
v: v3
  • Loading branch information
Mattia Dongili authored and Matthew Garrett committed Mar 28, 2011
1 parent fa12bda commit d92e453
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 80887757e304d1f973330d9398024cffcd82d00d
refs/heads/master: 56e6e716b5211f4cda8db63b9a16d083ee193480
14 changes: 11 additions & 3 deletions trunk/drivers/platform/x86/sony-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/*
Expand Down

0 comments on commit d92e453

Please sign in to comment.