aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/platform/x86/sony-laptop.c41
1 files changed, 23 insertions, 18 deletions
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c
index 011c03596b2c..e02edf68a68e 100644
--- a/drivers/platform/x86/sony-laptop.c
+++ b/drivers/platform/x86/sony-laptop.c
@@ -917,10 +917,10 @@ static struct sony_nc_event sony_127_events[] = {
917static void sony_acpi_notify(acpi_handle handle, u32 event, void *data) 917static void sony_acpi_notify(acpi_handle handle, u32 event, void *data)
918{ 918{
919 u32 ev = event; 919 u32 ev = event;
920 int result;
921 920
922 if (ev >= 0x90) { 921 if (ev >= 0x90) {
923 /* New-style event */ 922 /* New-style event */
923 int result;
924 int key_handle = 0; 924 int key_handle = 0;
925 ev -= 0x90; 925 ev -= 0x90;
926 926
@@ -932,38 +932,43 @@ static void sony_acpi_notify(acpi_handle handle, u32 event, void *data)
932 if (key_handle) { 932 if (key_handle) {
933 struct sony_nc_event *key_event; 933 struct sony_nc_event *key_event;
934 934
935 if (sony_call_snc_handle(key_handle, 0x200, &result)) 935 if (sony_call_snc_handle(key_handle, 0x200, &result)) {
936 dprintk("sony_acpi_notify, unable to decode" 936 dprintk("sony_acpi_notify, unable to decode"
937 " event 0x%.2x 0x%.2x\n", key_handle, 937 " event 0x%.2x 0x%.2x\n", key_handle,
938 ev); 938 ev);
939 else 939 /* restore the original event */
940 ev = event;
941 } else {
940 ev = result & 0xFF; 942 ev = result & 0xFF;
941 943
942 if (key_handle == 0x100) 944 if (key_handle == 0x100)
943 key_event = sony_100_events; 945 key_event = sony_100_events;
944 else 946 else
945 key_event = sony_127_events; 947 key_event = sony_127_events;
946 948
947 for (; key_event->data; key_event++) { 949 for (; key_event->data; key_event++) {
948 if (key_event->data == ev) { 950 if (key_event->data == ev) {
949 ev = key_event->event; 951 ev = key_event->event;
950 break; 952 break;
953 }
951 } 954 }
952 }
953 955
954 if (!key_event->data) { 956 if (!key_event->data)
955 printk(KERN_INFO DRV_PFX 957 printk(KERN_INFO DRV_PFX
956 "Unknown event: 0x%x 0x%x\n", key_handle, 958 "Unknown event: 0x%x 0x%x\n",
957 ev); 959 key_handle,
960 ev);
961 else
962 sony_laptop_report_input_event(ev);
958 } 963 }
959 } else if (sony_find_snc_handle(0x124) == ev) { 964 } else if (sony_find_snc_handle(0x124) == ev) {
960 sony_nc_rfkill_update(); 965 sony_nc_rfkill_update();
961 return; 966 return;
962 } 967 }
963 } 968 } else
969 sony_laptop_report_input_event(ev);
964 970
965 dprintk("sony_acpi_notify, event: 0x%.2x\n", ev); 971 dprintk("sony_acpi_notify, event: 0x%.2x\n", ev);
966 sony_laptop_report_input_event(ev);
967 acpi_bus_generate_proc_event(sony_nc_acpi_device, 1, ev); 972 acpi_bus_generate_proc_event(sony_nc_acpi_device, 1, ev);
968} 973}
969 974