The patch titled Subject: drivers-platform-x86-sony-laptopc-fix-scancodes-v2 has been added to the -mm tree. Its filename is drivers-platform-x86-sony-laptopc-fix-scancodes-v2.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ From: John Hughes <john@xxxxxxxxxxxx> Subject: drivers-platform-x86-sony-laptopc-fix-scancodes-v2 Signed-off-by: John Hughes <john@xxxxxxxxx> Cc: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Cc: Mattia Dongili <malattia@xxxxxxxx> Cc: John Hughes <john@xxxxxxxxx> Cc: Matthew Garrett <mjg@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/platform/x86/sony-laptop.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff -puN drivers/platform/x86/sony-laptop.c~drivers-platform-x86-sony-laptopc-fix-scancodes-v2 drivers/platform/x86/sony-laptop.c --- a/drivers/platform/x86/sony-laptop.c~drivers-platform-x86-sony-laptopc-fix-scancodes-v2 +++ a/drivers/platform/x86/sony-laptop.c @@ -347,7 +347,7 @@ static void sony_laptop_report_input_eve struct input_dev *jog_dev = sony_laptop_input.jog_dev; struct input_dev *key_dev = sony_laptop_input.key_dev; struct sony_laptop_keypress kp = { NULL }; - int scancode; + int scancode = -1; if (event == SONYPI_EVENT_FNKEY_RELEASED || event == SONYPI_EVENT_ANYBUTTON_RELEASED) { @@ -391,8 +391,10 @@ static void sony_laptop_report_input_eve } if (kp.dev) { - /* we emit the scancode so we can always remap the key */ - input_event(kp.dev, EV_MSC, MSC_SCAN, scancode); + /* if we have a scancode we emit it so we can always + remap the key */ + if (scancode != -1) + input_event(kp.dev, EV_MSC, MSC_SCAN, scancode); input_report_key(kp.dev, kp.key, 1); input_sync(kp.dev); @@ -468,7 +470,7 @@ static int sony_laptop_setup_input(struc jog_dev->name = "Sony Vaio Jogdial"; jog_dev->id.bustype = BUS_ISA; jog_dev->id.vendor = PCI_VENDOR_ID_SONY; - key_dev->dev.parent = &acpi_device->dev; + jog_dev->dev.parent = &acpi_device->dev; input_set_capability(jog_dev, EV_KEY, BTN_MIDDLE); input_set_capability(jog_dev, EV_REL, REL_WHEEL); _ Subject: Subject: drivers-platform-x86-sony-laptopc-fix-scancodes-v2 Patches currently in -mm which might be from john@xxxxxxxxxxxx are drivers-platform-x86-sony-laptopc-fix-scancodes.patch drivers-platform-x86-sony-laptopc-fix-scancodes-v2.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html