diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-12-12 20:19:58 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-12-12 20:19:58 -0500 |
commit | d39a01eff9af1045f6e30ff9db40310517c4b45f (patch) | |
tree | 5ecef2cc8759230f0848ec5604dc2256b0136af4 | |
parent | a638349bf6c29433b938141f99225b160551ff48 (diff) | |
parent | 532298b95075144bcccf56d792f3fb3fbef2d5d0 (diff) |
Merge tag 'platform-drivers-x86-v4.15-3' of git://git.infradead.org/linux-platform-drivers-x86
Pull x86 platform driver fixes from Darren Hart:
- Correct an error in the evdev protocol in asus-wireless which results
in dropped key events in recent versions of libinput
- Add a quirk for keyboard lighting for a specific Dell laptop
- Silence a static analysis warning regarding unchecked return values
of small kmalloc() allocations in dell-wmi
* tag 'platform-drivers-x86-v4.15-3' of git://git.infradead.org/linux-platform-drivers-x86:
platform/x86: dell-wmi: check for kmalloc() errors
platform/x86: asus-wireless: send an EV_SYN/SYN_REPORT between state changes
platform/x86: dell-laptop: Fix keyboard max lighting for Dell Latitude E6410
-rw-r--r-- | drivers/platform/x86/asus-wireless.c | 1 | ||||
-rw-r--r-- | drivers/platform/x86/dell-laptop.c | 17 | ||||
-rw-r--r-- | drivers/platform/x86/dell-wmi.c | 2 |
3 files changed, 20 insertions, 0 deletions
diff --git a/drivers/platform/x86/asus-wireless.c b/drivers/platform/x86/asus-wireless.c index f3796164329e..d4aeac3477f5 100644 --- a/drivers/platform/x86/asus-wireless.c +++ b/drivers/platform/x86/asus-wireless.c | |||
@@ -118,6 +118,7 @@ static void asus_wireless_notify(struct acpi_device *adev, u32 event) | |||
118 | return; | 118 | return; |
119 | } | 119 | } |
120 | input_report_key(data->idev, KEY_RFKILL, 1); | 120 | input_report_key(data->idev, KEY_RFKILL, 1); |
121 | input_sync(data->idev); | ||
121 | input_report_key(data->idev, KEY_RFKILL, 0); | 122 | input_report_key(data->idev, KEY_RFKILL, 0); |
122 | input_sync(data->idev); | 123 | input_sync(data->idev); |
123 | } | 124 | } |
diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c index bf897b1832b1..cd4725e7e0b5 100644 --- a/drivers/platform/x86/dell-laptop.c +++ b/drivers/platform/x86/dell-laptop.c | |||
@@ -37,6 +37,7 @@ | |||
37 | 37 | ||
38 | struct quirk_entry { | 38 | struct quirk_entry { |
39 | u8 touchpad_led; | 39 | u8 touchpad_led; |
40 | u8 kbd_led_levels_off_1; | ||
40 | 41 | ||
41 | int needs_kbd_timeouts; | 42 | int needs_kbd_timeouts; |
42 | /* | 43 | /* |
@@ -67,6 +68,10 @@ static struct quirk_entry quirk_dell_xps13_9333 = { | |||
67 | .kbd_timeouts = { 0, 5, 15, 60, 5 * 60, 15 * 60, -1 }, | 68 | .kbd_timeouts = { 0, 5, 15, 60, 5 * 60, 15 * 60, -1 }, |
68 | }; | 69 | }; |
69 | 70 | ||
71 | static struct quirk_entry quirk_dell_latitude_e6410 = { | ||
72 | .kbd_led_levels_off_1 = 1, | ||
73 | }; | ||
74 | |||
70 | static struct platform_driver platform_driver = { | 75 | static struct platform_driver platform_driver = { |
71 | .driver = { | 76 | .driver = { |
72 | .name = "dell-laptop", | 77 | .name = "dell-laptop", |
@@ -269,6 +274,15 @@ static const struct dmi_system_id dell_quirks[] __initconst = { | |||
269 | }, | 274 | }, |
270 | .driver_data = &quirk_dell_xps13_9333, | 275 | .driver_data = &quirk_dell_xps13_9333, |
271 | }, | 276 | }, |
277 | { | ||
278 | .callback = dmi_matched, | ||
279 | .ident = "Dell Latitude E6410", | ||
280 | .matches = { | ||
281 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), | ||
282 | DMI_MATCH(DMI_PRODUCT_NAME, "Latitude E6410"), | ||
283 | }, | ||
284 | .driver_data = &quirk_dell_latitude_e6410, | ||
285 | }, | ||
272 | { } | 286 | { } |
273 | }; | 287 | }; |
274 | 288 | ||
@@ -1149,6 +1163,9 @@ static int kbd_get_info(struct kbd_info *info) | |||
1149 | units = (buffer->output[2] >> 8) & 0xFF; | 1163 | units = (buffer->output[2] >> 8) & 0xFF; |
1150 | info->levels = (buffer->output[2] >> 16) & 0xFF; | 1164 | info->levels = (buffer->output[2] >> 16) & 0xFF; |
1151 | 1165 | ||
1166 | if (quirks && quirks->kbd_led_levels_off_1 && info->levels) | ||
1167 | info->levels--; | ||
1168 | |||
1152 | if (units & BIT(0)) | 1169 | if (units & BIT(0)) |
1153 | info->seconds = (buffer->output[3] >> 0) & 0xFF; | 1170 | info->seconds = (buffer->output[3] >> 0) & 0xFF; |
1154 | if (units & BIT(1)) | 1171 | if (units & BIT(1)) |
diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c index 39d2f4518483..fb25b20df316 100644 --- a/drivers/platform/x86/dell-wmi.c +++ b/drivers/platform/x86/dell-wmi.c | |||
@@ -639,6 +639,8 @@ static int dell_wmi_events_set_enabled(bool enable) | |||
639 | int ret; | 639 | int ret; |
640 | 640 | ||
641 | buffer = kzalloc(sizeof(struct calling_interface_buffer), GFP_KERNEL); | 641 | buffer = kzalloc(sizeof(struct calling_interface_buffer), GFP_KERNEL); |
642 | if (!buffer) | ||
643 | return -ENOMEM; | ||
642 | buffer->cmd_class = CLASS_INFO; | 644 | buffer->cmd_class = CLASS_INFO; |
643 | buffer->cmd_select = SELECT_APP_REGISTRATION; | 645 | buffer->cmd_select = SELECT_APP_REGISTRATION; |
644 | buffer->input[0] = 0x10000; | 646 | buffer->input[0] = 0x10000; |