diff mbox

Ignore garbage in dell-wmi events

Message ID 49F898E4.5080605@dell.com (mailing list archive)
State RFC, archived
Headers show

Commit Message

Mario Limonciello April 29, 2009, 6:13 p.m. UTC
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,

Comments

Matthew Garrett April 29, 2009, 6:28 p.m. UTC | #1
I think just this and the additional keycodes one for now.
diff mbox

Patch

Signed-off-by: Mario Limonciello <mario_limonciello@dell.com>
---

--- 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]);
 	}
 }