Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input fixes from Dmitry Torokhov:
"Two small fixups for spaceball joystick driver and appletouch touchpad
driver"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: spaceball - fix parsing of movement data packets
Input: appletouch - initialize work before device registration

+11 -4
+9 -2
drivers/input/joystick/spaceball.c
··· 19 19 #include <linux/module.h> 20 20 #include <linux/input.h> 21 21 #include <linux/serio.h> 22 + #include <asm/unaligned.h> 22 23 23 24 #define DRIVER_DESC "SpaceTec SpaceBall 2003/3003/4000 FLX driver" 24 25 ··· 76 75 77 76 case 'D': /* Ball data */ 78 77 if (spaceball->idx != 15) return; 79 - for (i = 0; i < 6; i++) 78 + /* 79 + * Skip first three bytes; read six axes worth of data. 80 + * Axis values are signed 16-bit big-endian. 81 + */ 82 + data += 3; 83 + for (i = 0; i < ARRAY_SIZE(spaceball_axes); i++) { 80 84 input_report_abs(dev, spaceball_axes[i], 81 - (__s16)((data[2 * i + 3] << 8) | data[2 * i + 2])); 85 + (__s16)get_unaligned_be16(&data[i * 2])); 86 + } 82 87 break; 83 88 84 89 case 'K': /* Button data */
+2 -2
drivers/input/mouse/appletouch.c
··· 916 916 set_bit(BTN_TOOL_TRIPLETAP, input_dev->keybit); 917 917 set_bit(BTN_LEFT, input_dev->keybit); 918 918 919 + INIT_WORK(&dev->work, atp_reinit); 920 + 919 921 error = input_register_device(dev->input); 920 922 if (error) 921 923 goto err_free_buffer; 922 924 923 925 /* save our data pointer in this interface device */ 924 926 usb_set_intfdata(iface, dev); 925 - 926 - INIT_WORK(&dev->work, atp_reinit); 927 927 928 928 return 0; 929 929