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

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: i8042 - fix device removal on unload
Input: bcm5974 - adjust major/minor to scale
Input: MT - initialize slots to unused
Input: use PIT_TICK_RATE in vt beep ioctl
Input: wacom - fix mousewheel handling for old wacom tablets

+28 -17
+8 -8
drivers/char/vt_ioctl.c
··· 533 533 case KIOCSOUND: 534 534 if (!perm) 535 535 goto eperm; 536 - /* FIXME: This is an old broken API but we need to keep it 537 - supported and somehow separate the historic advertised 538 - tick rate from any real one */ 536 + /* 537 + * The use of PIT_TICK_RATE is historic, it used to be 538 + * the platform-dependent CLOCK_TICK_RATE between 2.6.12 539 + * and 2.6.36, which was a minor but unfortunate ABI 540 + * change. 541 + */ 539 542 if (arg) 540 - arg = CLOCK_TICK_RATE / arg; 543 + arg = PIT_TICK_RATE / arg; 541 544 kd_mksound(arg, 0); 542 545 break; 543 546 ··· 556 553 */ 557 554 ticks = HZ * ((arg >> 16) & 0xffff) / 1000; 558 555 count = ticks ? (arg & 0xffff) : 0; 559 - /* FIXME: This is an old broken API but we need to keep it 560 - supported and somehow separate the historic advertised 561 - tick rate from any real one */ 562 556 if (count) 563 - count = CLOCK_TICK_RATE / count; 557 + count = PIT_TICK_RATE / count; 564 558 kd_mksound(count, ticks); 565 559 break; 566 560 }
+9 -2
drivers/input/input.c
··· 1599 1599 * @dev: input device supporting MT events and finger tracking 1600 1600 * @num_slots: number of slots used by the device 1601 1601 * 1602 - * This function allocates all necessary memory for MT slot handling 1603 - * in the input device, and adds ABS_MT_SLOT to the device capabilities. 1602 + * This function allocates all necessary memory for MT slot handling in the 1603 + * input device, and adds ABS_MT_SLOT to the device capabilities. All slots 1604 + * are initially marked as unused iby setting ABS_MT_TRACKING_ID to -1. 1604 1605 */ 1605 1606 int input_mt_create_slots(struct input_dev *dev, unsigned int num_slots) 1606 1607 { 1608 + int i; 1609 + 1607 1610 if (!num_slots) 1608 1611 return 0; 1609 1612 ··· 1616 1613 1617 1614 dev->mtsize = num_slots; 1618 1615 input_set_abs_params(dev, ABS_MT_SLOT, 0, num_slots - 1, 0, 0); 1616 + 1617 + /* Mark slots as 'unused' */ 1618 + for (i = 0; i < num_slots; i++) 1619 + dev->mt[i].abs[ABS_MT_TRACKING_ID - ABS_MT_FIRST] = -1; 1619 1620 1620 1621 return 0; 1621 1622 }
+8 -4
drivers/input/mouse/bcm5974.c
··· 337 337 const struct bcm5974_config *cfg, 338 338 const struct tp_finger *f) 339 339 { 340 - input_report_abs(input, ABS_MT_TOUCH_MAJOR, raw2int(f->force_major)); 341 - input_report_abs(input, ABS_MT_TOUCH_MINOR, raw2int(f->force_minor)); 342 - input_report_abs(input, ABS_MT_WIDTH_MAJOR, raw2int(f->size_major)); 343 - input_report_abs(input, ABS_MT_WIDTH_MINOR, raw2int(f->size_minor)); 340 + input_report_abs(input, ABS_MT_TOUCH_MAJOR, 341 + raw2int(f->force_major) << 1); 342 + input_report_abs(input, ABS_MT_TOUCH_MINOR, 343 + raw2int(f->force_minor) << 1); 344 + input_report_abs(input, ABS_MT_WIDTH_MAJOR, 345 + raw2int(f->size_major) << 1); 346 + input_report_abs(input, ABS_MT_WIDTH_MINOR, 347 + raw2int(f->size_minor) << 1); 344 348 input_report_abs(input, ABS_MT_ORIENTATION, 345 349 MAX_FINGER_ORIENTATION - raw2int(f->orientation)); 346 350 input_report_abs(input, ABS_MT_POSITION_X, raw2int(f->abs_x));
+1 -1
drivers/input/serio/i8042.c
··· 1485 1485 1486 1486 static void __exit i8042_exit(void) 1487 1487 { 1488 - platform_driver_unregister(&i8042_driver); 1489 1488 platform_device_unregister(i8042_platform_device); 1489 + platform_driver_unregister(&i8042_driver); 1490 1490 i8042_platform_exit(); 1491 1491 1492 1492 panic_blink = NULL;
+2 -2
drivers/input/tablet/wacom_wac.c
··· 243 243 if (features->type == WACOM_G4 || 244 244 features->type == WACOM_MO) { 245 245 input_report_abs(input, ABS_DISTANCE, data[6] & 0x3f); 246 - rw = (signed)(data[7] & 0x04) - (data[7] & 0x03); 246 + rw = (data[7] & 0x04) - (data[7] & 0x03); 247 247 } else { 248 248 input_report_abs(input, ABS_DISTANCE, data[7] & 0x3f); 249 - rw = -(signed)data[6]; 249 + rw = -(signed char)data[6]; 250 250 } 251 251 input_report_rel(input, REL_WHEEL, rw); 252 252 }