aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)
733 733
734 for (i = 0x20; i < 0x30; i++) { 734 for (i = 0x20; i < 0x30; i++) {
735 acpi_callsetfunc(sony_nc_acpi_handle, "SN00", i, &result); 735 acpi_callsetfunc(sony_nc_acpi_handle, "SN00", i, &result);
736 if (result == handle) 736 if (result == handle) {
737 dprintk("found handle 0x%.4x (offset: 0x%.2x)\n",
738 handle, i - 0x20);
737 return i-0x20; 739 return i-0x20;
740 }
738 } 741 }
739 742
743 dprintk("handle 0x%.4x not found\n", handle);
740 return -1; 744 return -1;
741} 745}
742 746
743static int sony_call_snc_handle(int handle, int argument, int *result) 747static int sony_call_snc_handle(int handle, int argument, int *result)
744{ 748{
749 int ret = 0;
745 int offset = sony_find_snc_handle(handle); 750 int offset = sony_find_snc_handle(handle);
746 751
747 if (offset < 0) 752 if (offset < 0)
748 return -1; 753 return -1;
749 754
750 return acpi_callsetfunc(sony_nc_acpi_handle, "SN07", offset | argument, 755 ret = acpi_callsetfunc(sony_nc_acpi_handle, "SN07", offset | argument,
751 result); 756 result);
757 dprintk("called SN07 with 0x%.4x (result: 0x%.4x)\n", offset | argument,
758 *result);
759 return ret;
752} 760}
753 761
754/* 762/*