diff options
Diffstat (limited to 'drivers/platform/x86/sony-laptop.c')
-rw-r--r-- | drivers/platform/x86/sony-laptop.c | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c index d3c92d777bde..552958545f94 100644 --- a/drivers/platform/x86/sony-laptop.c +++ b/drivers/platform/x86/sony-laptop.c | |||
@@ -317,7 +317,8 @@ static void sony_laptop_report_input_event(u8 event) | |||
317 | struct input_dev *key_dev = sony_laptop_input.key_dev; | 317 | struct input_dev *key_dev = sony_laptop_input.key_dev; |
318 | struct sony_laptop_keypress kp = { NULL }; | 318 | struct sony_laptop_keypress kp = { NULL }; |
319 | 319 | ||
320 | if (event == SONYPI_EVENT_FNKEY_RELEASED) { | 320 | if (event == SONYPI_EVENT_FNKEY_RELEASED || |
321 | event == SONYPI_EVENT_ANYBUTTON_RELEASED) { | ||
321 | /* Nothing, not all VAIOs generate this event */ | 322 | /* Nothing, not all VAIOs generate this event */ |
322 | return; | 323 | return; |
323 | } | 324 | } |
@@ -905,7 +906,6 @@ static struct sony_nc_event sony_127_events[] = { | |||
905 | { 0x05, SONYPI_EVENT_ANYBUTTON_RELEASED }, | 906 | { 0x05, SONYPI_EVENT_ANYBUTTON_RELEASED }, |
906 | { 0x86, SONYPI_EVENT_PKEY_P5 }, | 907 | { 0x86, SONYPI_EVENT_PKEY_P5 }, |
907 | { 0x06, SONYPI_EVENT_ANYBUTTON_RELEASED }, | 908 | { 0x06, SONYPI_EVENT_ANYBUTTON_RELEASED }, |
908 | { 0x06, SONYPI_EVENT_ANYBUTTON_RELEASED }, | ||
909 | { 0x87, SONYPI_EVENT_SETTINGKEY_PRESSED }, | 909 | { 0x87, SONYPI_EVENT_SETTINGKEY_PRESSED }, |
910 | { 0x07, SONYPI_EVENT_ANYBUTTON_RELEASED }, | 910 | { 0x07, SONYPI_EVENT_ANYBUTTON_RELEASED }, |
911 | { 0, 0 }, | 911 | { 0, 0 }, |
@@ -1004,6 +1004,7 @@ static int sony_nc_function_setup(struct acpi_device *device) | |||
1004 | sony_call_snc_handle(0x0100, 0, &result); | 1004 | sony_call_snc_handle(0x0100, 0, &result); |
1005 | sony_call_snc_handle(0x0101, 0, &result); | 1005 | sony_call_snc_handle(0x0101, 0, &result); |
1006 | sony_call_snc_handle(0x0102, 0x100, &result); | 1006 | sony_call_snc_handle(0x0102, 0x100, &result); |
1007 | sony_call_snc_handle(0x0127, 0, &result); | ||
1007 | 1008 | ||
1008 | return 0; | 1009 | return 0; |
1009 | } | 1010 | } |
@@ -1040,7 +1041,7 @@ static int sony_nc_resume(struct acpi_device *device) | |||
1040 | 1041 | ||
1041 | /* set the last requested brightness level */ | 1042 | /* set the last requested brightness level */ |
1042 | if (sony_backlight_device && | 1043 | if (sony_backlight_device && |
1043 | !sony_backlight_update_status(sony_backlight_device)) | 1044 | sony_backlight_update_status(sony_backlight_device) < 0) |
1044 | printk(KERN_WARNING DRV_PFX "unable to restore brightness level\n"); | 1045 | printk(KERN_WARNING DRV_PFX "unable to restore brightness level\n"); |
1045 | 1046 | ||
1046 | return 0; | 1047 | return 0; |
@@ -1102,8 +1103,11 @@ static int sony_nc_setup_wifi_rfkill(struct acpi_device *device) | |||
1102 | err = rfkill_register(sony_wifi_rfkill); | 1103 | err = rfkill_register(sony_wifi_rfkill); |
1103 | if (err) | 1104 | if (err) |
1104 | rfkill_free(sony_wifi_rfkill); | 1105 | rfkill_free(sony_wifi_rfkill); |
1105 | else | 1106 | else { |
1106 | sony_rfkill_devices[SONY_WIFI] = sony_wifi_rfkill; | 1107 | sony_rfkill_devices[SONY_WIFI] = sony_wifi_rfkill; |
1108 | sony_nc_rfkill_set(sony_wifi_rfkill->data, | ||
1109 | RFKILL_STATE_UNBLOCKED); | ||
1110 | } | ||
1107 | return err; | 1111 | return err; |
1108 | } | 1112 | } |
1109 | 1113 | ||
@@ -1124,8 +1128,11 @@ static int sony_nc_setup_bluetooth_rfkill(struct acpi_device *device) | |||
1124 | err = rfkill_register(sony_bluetooth_rfkill); | 1128 | err = rfkill_register(sony_bluetooth_rfkill); |
1125 | if (err) | 1129 | if (err) |
1126 | rfkill_free(sony_bluetooth_rfkill); | 1130 | rfkill_free(sony_bluetooth_rfkill); |
1127 | else | 1131 | else { |
1128 | sony_rfkill_devices[SONY_BLUETOOTH] = sony_bluetooth_rfkill; | 1132 | sony_rfkill_devices[SONY_BLUETOOTH] = sony_bluetooth_rfkill; |
1133 | sony_nc_rfkill_set(sony_bluetooth_rfkill->data, | ||
1134 | RFKILL_STATE_UNBLOCKED); | ||
1135 | } | ||
1129 | return err; | 1136 | return err; |
1130 | } | 1137 | } |
1131 | 1138 | ||
@@ -1145,8 +1152,11 @@ static int sony_nc_setup_wwan_rfkill(struct acpi_device *device) | |||
1145 | err = rfkill_register(sony_wwan_rfkill); | 1152 | err = rfkill_register(sony_wwan_rfkill); |
1146 | if (err) | 1153 | if (err) |
1147 | rfkill_free(sony_wwan_rfkill); | 1154 | rfkill_free(sony_wwan_rfkill); |
1148 | else | 1155 | else { |
1149 | sony_rfkill_devices[SONY_WWAN] = sony_wwan_rfkill; | 1156 | sony_rfkill_devices[SONY_WWAN] = sony_wwan_rfkill; |
1157 | sony_nc_rfkill_set(sony_wwan_rfkill->data, | ||
1158 | RFKILL_STATE_UNBLOCKED); | ||
1159 | } | ||
1150 | return err; | 1160 | return err; |
1151 | } | 1161 | } |
1152 | 1162 | ||
@@ -1166,8 +1176,11 @@ static int sony_nc_setup_wimax_rfkill(struct acpi_device *device) | |||
1166 | err = rfkill_register(sony_wimax_rfkill); | 1176 | err = rfkill_register(sony_wimax_rfkill); |
1167 | if (err) | 1177 | if (err) |
1168 | rfkill_free(sony_wimax_rfkill); | 1178 | rfkill_free(sony_wimax_rfkill); |
1169 | else | 1179 | else { |
1170 | sony_rfkill_devices[SONY_WIMAX] = sony_wimax_rfkill; | 1180 | sony_rfkill_devices[SONY_WIMAX] = sony_wimax_rfkill; |
1181 | sony_nc_rfkill_set(sony_wimax_rfkill->data, | ||
1182 | RFKILL_STATE_UNBLOCKED); | ||
1183 | } | ||
1171 | return err; | 1184 | return err; |
1172 | } | 1185 | } |
1173 | 1186 | ||