Skip to content

Commit d39a01e

Browse files
committed
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
2 parents a638349 + 532298b commit d39a01e

3 files changed

Lines changed: 20 additions & 0 deletions

File tree

‎drivers/platform/x86/asus-wireless.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ static void asus_wireless_notify(struct acpi_device *adev, u32 event)
118118
return;
119119
}
120120
input_report_key(data->idev, KEY_RFKILL, 1);
121+
input_sync(data->idev);
121122
input_report_key(data->idev, KEY_RFKILL, 0);
122123
input_sync(data->idev);
123124
}

‎drivers/platform/x86/dell-laptop.c‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737

3838
struct quirk_entry {
3939
u8 touchpad_led;
40+
u8 kbd_led_levels_off_1;
4041

4142
int needs_kbd_timeouts;
4243
/*
@@ -67,6 +68,10 @@ static struct quirk_entry quirk_dell_xps13_9333 = {
6768
.kbd_timeouts = { 0, 5, 15, 60, 5 * 60, 15 * 60, -1 },
6869
};
6970

71+
static struct quirk_entry quirk_dell_latitude_e6410 = {
72+
.kbd_led_levels_off_1 = 1,
73+
};
74+
7075
static struct platform_driver platform_driver = {
7176
.driver = {
7277
.name = "dell-laptop",
@@ -269,6 +274,15 @@ static const struct dmi_system_id dell_quirks[] __initconst = {
269274
},
270275
.driver_data = &quirk_dell_xps13_9333,
271276
},
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+
},
272286
{ }
273287
};
274288

@@ -1149,6 +1163,9 @@ static int kbd_get_info(struct kbd_info *info)
11491163
units = (buffer->output[2] >> 8) & 0xFF;
11501164
info->levels = (buffer->output[2] >> 16) & 0xFF;
11511165

1166+
if (quirks && quirks->kbd_led_levels_off_1 && info->levels)
1167+
info->levels--;
1168+
11521169
if (units & BIT(0))
11531170
info->seconds = (buffer->output[3] >> 0) & 0xFF;
11541171
if (units & BIT(1))

‎drivers/platform/x86/dell-wmi.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,8 @@ static int dell_wmi_events_set_enabled(bool enable)
639639
int ret;
640640

641641
buffer = kzalloc(sizeof(struct calling_interface_buffer), GFP_KERNEL);
642+
if (!buffer)
643+
return -ENOMEM;
642644
buffer->cmd_class = CLASS_INFO;
643645
buffer->cmd_select = SELECT_APP_REGISTRATION;
644646
buffer->input[0] = 0x10000;

0 commit comments

Comments
 (0)