aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/char/vt_ioctl.c16
-rw-r--r--drivers/input/input.c11
-rw-r--r--drivers/input/mouse/bcm5974.c12
-rw-r--r--drivers/input/serio/i8042.c2
-rw-r--r--drivers/input/tablet/wacom_wac.c4
5 files changed, 28 insertions, 17 deletions
diff --git a/drivers/char/vt_ioctl.c b/drivers/char/vt_ioctl.c
index 2bbeaaea46e..38df8c19e74 100644
--- a/drivers/char/vt_ioctl.c
+++ b/drivers/char/vt_ioctl.c
@@ -533,11 +533,14 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
533 case KIOCSOUND: 533 case KIOCSOUND:
534 if (!perm) 534 if (!perm)
535 goto eperm; 535 goto eperm;
536 /* FIXME: This is an old broken API but we need to keep it 536 /*
537 supported and somehow separate the historic advertised 537 * The use of PIT_TICK_RATE is historic, it used to be
538 tick rate from any real one */ 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 if (arg) 542 if (arg)
540 arg = CLOCK_TICK_RATE / arg; 543 arg = PIT_TICK_RATE / arg;
541 kd_mksound(arg, 0); 544 kd_mksound(arg, 0);
542 break; 545 break;
543 546
@@ -553,11 +556,8 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
553 */ 556 */
554 ticks = HZ * ((arg >> 16) & 0xffff) / 1000; 557 ticks = HZ * ((arg >> 16) & 0xffff) / 1000;
555 count = ticks ? (arg & 0xffff) : 0; 558 count = ticks ? (arg & 0xffff) : 0;
556 /* FIXME: This is an old broken API but we need to keep it
557 supported and somehow separate the historic advertised
558 tick rate from any real one */
559 if (count) 559 if (count)
560 count = CLOCK_TICK_RATE / count; 560 count = PIT_TICK_RATE / count;
561 kd_mksound(count, ticks); 561 kd_mksound(count, ticks);
562 break; 562 break;
563 } 563 }
diff --git a/drivers/input/input.c b/drivers/input/input.c
index a9b025f4147..ab698205651 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -1599,11 +1599,14 @@ EXPORT_SYMBOL(input_free_device);
1599 * @dev: input device supporting MT events and finger tracking 1599 * @dev: input device supporting MT events and finger tracking
1600 * @num_slots: number of slots used by the device 1600 * @num_slots: number of slots used by the device
1601 * 1601 *
1602 * This function allocates all necessary memory for MT slot handling 1602 * This function allocates all necessary memory for MT slot handling in the
1603 * in the input device, and adds ABS_MT_SLOT to the device capabilities. 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 */
1605int input_mt_create_slots(struct input_dev *dev, unsigned int num_slots) 1606int input_mt_create_slots(struct input_dev *dev, unsigned int num_slots)
1606{ 1607{
1608 int i;
1609
1607 if (!num_slots) 1610 if (!num_slots)
1608 return 0; 1611 return 0;
1609 1612
@@ -1614,6 +1617,10 @@ int input_mt_create_slots(struct input_dev *dev, unsigned int num_slots)
1614 dev->mtsize = num_slots; 1617 dev->mtsize = num_slots;
1615 input_set_abs_params(dev, ABS_MT_SLOT, 0, num_slots - 1, 0, 0); 1618 input_set_abs_params(dev, ABS_MT_SLOT, 0, num_slots - 1, 0, 0);
1616 1619
1620 /* Mark slots as 'unused' */
1621 for (i = 0; i < num_slots; i++)
1622 dev->mt[i].abs[ABS_MT_TRACKING_ID - ABS_MT_FIRST] = -1;
1623
1617 return 0; 1624 return 0;
1618} 1625}
1619EXPORT_SYMBOL(input_mt_create_slots); 1626EXPORT_SYMBOL(input_mt_create_slots);
diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c
index ea67c49146a..b9523176391 100644
--- a/drivers/input/mouse/bcm5974.c
+++ b/drivers/input/mouse/bcm5974.c
@@ -337,10 +337,14 @@ static void report_finger_data(struct input_dev *input,
337 const struct bcm5974_config *cfg, 337 const struct bcm5974_config *cfg,
338 const struct tp_finger *f) 338 const struct tp_finger *f)
339{ 339{
340 input_report_abs(input, ABS_MT_TOUCH_MAJOR, raw2int(f->force_major)); 340 input_report_abs(input, ABS_MT_TOUCH_MAJOR,
341 input_report_abs(input, ABS_MT_TOUCH_MINOR, raw2int(f->force_minor)); 341 raw2int(f->force_major) << 1);
342 input_report_abs(input, ABS_MT_WIDTH_MAJOR, raw2int(f->size_major)); 342 input_report_abs(input, ABS_MT_TOUCH_MINOR,
343 input_report_abs(input, ABS_MT_WIDTH_MINOR, raw2int(f->size_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 input_report_abs(input, ABS_MT_ORIENTATION, 348 input_report_abs(input, ABS_MT_ORIENTATION,
345 MAX_FINGER_ORIENTATION - raw2int(f->orientation)); 349 MAX_FINGER_ORIENTATION - raw2int(f->orientation));
346 input_report_abs(input, ABS_MT_POSITION_X, raw2int(f->abs_x)); 350 input_report_abs(input, ABS_MT_POSITION_X, raw2int(f->abs_x));
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
index 46e4ba0b924..f5851316048 100644
--- a/drivers/input/serio/i8042.c
+++ b/drivers/input/serio/i8042.c
@@ -1485,8 +1485,8 @@ static int __init i8042_init(void)
1485 1485
1486static void __exit i8042_exit(void) 1486static void __exit i8042_exit(void)
1487{ 1487{
1488 platform_driver_unregister(&i8042_driver);
1489 platform_device_unregister(i8042_platform_device); 1488 platform_device_unregister(i8042_platform_device);
1489 platform_driver_unregister(&i8042_driver);
1490 i8042_platform_exit(); 1490 i8042_platform_exit();
1491 1491
1492 panic_blink = NULL; 1492 panic_blink = NULL;
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
index 40d77ba8fdc..6e29badb969 100644
--- a/drivers/input/tablet/wacom_wac.c
+++ b/drivers/input/tablet/wacom_wac.c
@@ -243,10 +243,10 @@ static int wacom_graphire_irq(struct wacom_wac *wacom)
243 if (features->type == WACOM_G4 || 243 if (features->type == WACOM_G4 ||
244 features->type == WACOM_MO) { 244 features->type == WACOM_MO) {
245 input_report_abs(input, ABS_DISTANCE, data[6] & 0x3f); 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 } else { 247 } else {
248 input_report_abs(input, ABS_DISTANCE, data[7] & 0x3f); 248 input_report_abs(input, ABS_DISTANCE, data[7] & 0x3f);
249 rw = -(signed)data[6]; 249 rw = -(signed char)data[6];
250 } 250 }
251 input_report_rel(input, REL_WHEEL, rw); 251 input_report_rel(input, REL_WHEEL, rw);
252 } 252 }