Re: [PATCH] Ignore garbage in dell-wmi events

From: Mario Limonciello
Date: Wed Apr 29 2009 - 14:14:12 EST


Sure. Do you want me to resend all of them to add that?

Matthew Garrett wrote:
> Hi Mario,
>
> Can you add your signed-off-by: for this?
>
> Thanks,
>
Regards,

--
Mario Limonciello
*Dell | Linux Engineering*
mario_limonciello@xxxxxxxx

Signed-off-by: Mario Limonciello <mario_limonciello@xxxxxxxx>
---

--- a/drivers/platform/x86/dell-wmi.c~ 2009-04-28 12:32:32.000000000 -0500
+++ b/drivers/platform/x86/dell-wmi.c 2009-04-28 12:33:02.000000000 -0500
@@ -182,7 +182,7 @@

if (obj && obj->type == ACPI_TYPE_BUFFER) {
int *buffer = (int *)obj->buffer.pointer;
- key = dell_wmi_get_entry_by_scancode(buffer[1]);
+ key = dell_wmi_get_entry_by_scancode(0xFFFF & buffer[1]);
if (key) {
input_report_key(dell_wmi_input_dev, key->keycode, 1);
input_sync(dell_wmi_input_dev);
@@ -190,7 +190,7 @@
input_sync(dell_wmi_input_dev);
} else
printk(KERN_INFO "dell-wmi: Unknown key %x pressed\n",
- buffer[1]);
+ 0xFFFF & buffer[1]);
}
}

Attachment: signature.asc
Description: OpenPGP digital signature