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

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

Pull input updates from Dmitry Torokhov:
"Small driver fixups"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: elants_i2c - avoid divide by 0 errors on bad touchscreen data
Input: adxl34x - make it enumerable in ACPI environment
Input: ALPS - fix TrackStick Y axis handling for SS5 hardware
Input: synaptics-rmi4 - fix F03 build error when serio is module
Input: xpad - use correct product id for x360w controllers
Input: synaptics_i2c - change msleep to usleep_range for small msecs
Input: i8042 - add Pegatron touchpad to noloop table
Input: joydev - remove unused linux/miscdevice.h include

+20 -10
-1
drivers/input/joydev.c
··· 22 22 #include <linux/sched.h> 23 23 #include <linux/slab.h> 24 24 #include <linux/mm.h> 25 - #include <linux/miscdevice.h> 26 25 #include <linux/module.h> 27 26 #include <linux/poll.h> 28 27 #include <linux/init.h>
+6
drivers/input/joystick/xpad.c
··· 1377 1377 input_dev->name = xpad->name; 1378 1378 input_dev->phys = xpad->phys; 1379 1379 usb_to_input_id(xpad->udev, &input_dev->id); 1380 + 1381 + if (xpad->xtype == XTYPE_XBOX360W) { 1382 + /* x360w controllers and the receiver have different ids */ 1383 + input_dev->id.product = 0x02a1; 1384 + } 1385 + 1380 1386 input_dev->dev.parent = &xpad->intf->dev; 1381 1387 1382 1388 input_set_drvdata(input_dev, xpad);
+1 -3
drivers/input/misc/adxl34x-i2c.c
··· 136 136 137 137 MODULE_DEVICE_TABLE(i2c, adxl34x_id); 138 138 139 - #ifdef CONFIG_OF 140 139 static const struct of_device_id adxl34x_of_id[] = { 141 140 /* 142 141 * The ADXL346 is backward-compatible with the ADXL345. Differences are ··· 152 153 }; 153 154 154 155 MODULE_DEVICE_TABLE(of, adxl34x_of_id); 155 - #endif 156 156 157 157 static struct i2c_driver adxl34x_driver = { 158 158 .driver = { 159 159 .name = "adxl34x", 160 160 .pm = &adxl34x_i2c_pm, 161 - .of_match_table = of_match_ptr(adxl34x_of_id), 161 + .of_match_table = adxl34x_of_id, 162 162 }, 163 163 .probe = adxl34x_i2c_probe, 164 164 .remove = adxl34x_i2c_remove,
+1 -1
drivers/input/mouse/alps.h
··· 114 114 (_b[1] & 0x7F) \ 115 115 ) 116 116 117 - #define SS4_TS_Y_V2(_b) (s8)( \ 117 + #define SS4_TS_Y_V2(_b) -(s8)( \ 118 118 ((_b[3] & 0x01) << 7) | \ 119 119 (_b[2] & 0x7F) \ 120 120 )
+2 -2
drivers/input/mouse/synaptics_i2c.c
··· 29 29 * after soft reset, we should wait for 1 ms 30 30 * before the device becomes operational 31 31 */ 32 - #define SOFT_RESET_DELAY_MS 3 32 + #define SOFT_RESET_DELAY_US 3000 33 33 /* and after hard reset, we should wait for max 500ms */ 34 34 #define HARD_RESET_DELAY_MS 500 35 35 ··· 311 311 if (ret) { 312 312 dev_err(&client->dev, "Unable to reset device\n"); 313 313 } else { 314 - msleep(SOFT_RESET_DELAY_MS); 314 + usleep_range(SOFT_RESET_DELAY_US, SOFT_RESET_DELAY_US + 100); 315 315 ret = synaptics_i2c_config(client); 316 316 if (ret) 317 317 dev_err(&client->dev, "Unable to config device\n");
+2 -1
drivers/input/rmi4/Kconfig
··· 41 41 42 42 config RMI4_F03 43 43 bool "RMI4 Function 03 (PS2 Guest)" 44 - depends on RMI4_CORE && SERIO 44 + depends on RMI4_CORE 45 + depends on SERIO=y || RMI4_CORE=SERIO 45 46 help 46 47 Say Y here if you want to add support for RMI4 function 03. 47 48
+6
drivers/input/serio/i8042-x86ia64io.h
··· 211 211 DMI_MATCH(DMI_PRODUCT_VERSION, "Rev 1"), 212 212 }, 213 213 }, 214 + { 215 + .matches = { 216 + DMI_MATCH(DMI_SYS_VENDOR, "PEGATRON CORPORATION"), 217 + DMI_MATCH(DMI_PRODUCT_NAME, "C15B"), 218 + }, 219 + }, 214 220 { } 215 221 }; 216 222
+2 -2
drivers/input/touchscreen/elants_i2c.c
··· 914 914 915 915 case QUEUE_HEADER_NORMAL: 916 916 report_count = ts->buf[FW_HDR_COUNT]; 917 - if (report_count > 3) { 917 + if (report_count == 0 || report_count > 3) { 918 918 dev_err(&client->dev, 919 - "too large report count: %*ph\n", 919 + "bad report count: %*ph\n", 920 920 HEADER_SIZE, ts->buf); 921 921 break; 922 922 }