diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-10-07 03:43:11 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-10-07 03:43:11 -0400 |
commit | d4f8f217b8a5d5bd02af979650418dca4caec472 (patch) | |
tree | af047bfa9729c975e24cb7624107574e884d3a57 /drivers/input | |
parent | 2dfbf4dfbe47a484bae20456c12b40763b9b6af7 (diff) | |
parent | 773e3f93577ffb493fb7c39b1a6ecf39b5748e87 (diff) |
Merge branch 'rcu/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-2.6-rcu into core/rcu
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/input.c | 11 | ||||
-rw-r--r-- | drivers/input/keyboard/hil_kbd.c | 12 | ||||
-rw-r--r-- | drivers/input/keyboard/pxa27x_keypad.c | 2 | ||||
-rw-r--r-- | drivers/input/misc/uinput.c | 2 | ||||
-rw-r--r-- | drivers/input/mouse/bcm5974.c | 12 | ||||
-rw-r--r-- | drivers/input/mousedev.c | 8 | ||||
-rw-r--r-- | drivers/input/serio/i8042.c | 2 | ||||
-rw-r--r-- | drivers/input/tablet/wacom_wac.c | 4 |
8 files changed, 32 insertions, 21 deletions
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 | */ |
1605 | int input_mt_create_slots(struct input_dev *dev, unsigned int num_slots) | 1606 | int 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 | } |
1619 | EXPORT_SYMBOL(input_mt_create_slots); | 1626 | EXPORT_SYMBOL(input_mt_create_slots); |
diff --git a/drivers/input/keyboard/hil_kbd.c b/drivers/input/keyboard/hil_kbd.c index dcc86b97a15..19fa94af207 100644 --- a/drivers/input/keyboard/hil_kbd.c +++ b/drivers/input/keyboard/hil_kbd.c | |||
@@ -232,13 +232,13 @@ static void hil_dev_handle_ptr_events(struct hil_dev *ptr) | |||
232 | if (absdev) { | 232 | if (absdev) { |
233 | val = lo + (hi << 8); | 233 | val = lo + (hi << 8); |
234 | #ifdef TABLET_AUTOADJUST | 234 | #ifdef TABLET_AUTOADJUST |
235 | if (val < input_abs_min(dev, ABS_X + i)) | 235 | if (val < input_abs_get_min(dev, ABS_X + i)) |
236 | input_abs_set_min(dev, ABS_X + i, val); | 236 | input_abs_set_min(dev, ABS_X + i, val); |
237 | if (val > input_abs_max(dev, ABS_X + i)) | 237 | if (val > input_abs_get_max(dev, ABS_X + i)) |
238 | input_abs_set_max(dev, ABS_X + i, val); | 238 | input_abs_set_max(dev, ABS_X + i, val); |
239 | #endif | 239 | #endif |
240 | if (i % 3) | 240 | if (i % 3) |
241 | val = input_abs_max(dev, ABS_X + i) - val; | 241 | val = input_abs_get_max(dev, ABS_X + i) - val; |
242 | input_report_abs(dev, ABS_X + i, val); | 242 | input_report_abs(dev, ABS_X + i, val); |
243 | } else { | 243 | } else { |
244 | val = (int) (((int8_t) lo) | ((int8_t) hi << 8)); | 244 | val = (int) (((int8_t) lo) | ((int8_t) hi << 8)); |
@@ -388,11 +388,11 @@ static void hil_dev_pointer_setup(struct hil_dev *ptr) | |||
388 | 388 | ||
389 | #ifdef TABLET_AUTOADJUST | 389 | #ifdef TABLET_AUTOADJUST |
390 | for (i = 0; i < ABS_MAX; i++) { | 390 | for (i = 0; i < ABS_MAX; i++) { |
391 | int diff = input_abs_max(input_dev, ABS_X + i) / 10; | 391 | int diff = input_abs_get_max(input_dev, ABS_X + i) / 10; |
392 | input_abs_set_min(input_dev, ABS_X + i, | 392 | input_abs_set_min(input_dev, ABS_X + i, |
393 | input_abs_min(input_dev, ABS_X + i) + diff) | 393 | input_abs_get_min(input_dev, ABS_X + i) + diff); |
394 | input_abs_set_max(input_dev, ABS_X + i, | 394 | input_abs_set_max(input_dev, ABS_X + i, |
395 | input_abs_max(input_dev, ABS_X + i) - diff) | 395 | input_abs_get_max(input_dev, ABS_X + i) - diff); |
396 | } | 396 | } |
397 | #endif | 397 | #endif |
398 | 398 | ||
diff --git a/drivers/input/keyboard/pxa27x_keypad.c b/drivers/input/keyboard/pxa27x_keypad.c index 0e53b3bc39a..f32404f9918 100644 --- a/drivers/input/keyboard/pxa27x_keypad.c +++ b/drivers/input/keyboard/pxa27x_keypad.c | |||
@@ -567,8 +567,6 @@ static int __devexit pxa27x_keypad_remove(struct platform_device *pdev) | |||
567 | clk_put(keypad->clk); | 567 | clk_put(keypad->clk); |
568 | 568 | ||
569 | input_unregister_device(keypad->input_dev); | 569 | input_unregister_device(keypad->input_dev); |
570 | input_free_device(keypad->input_dev); | ||
571 | |||
572 | iounmap(keypad->mmio_base); | 570 | iounmap(keypad->mmio_base); |
573 | 571 | ||
574 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 572 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c index bb53fd33cd1..0d4266a533a 100644 --- a/drivers/input/misc/uinput.c +++ b/drivers/input/misc/uinput.c | |||
@@ -811,6 +811,8 @@ static struct miscdevice uinput_misc = { | |||
811 | .minor = UINPUT_MINOR, | 811 | .minor = UINPUT_MINOR, |
812 | .name = UINPUT_NAME, | 812 | .name = UINPUT_NAME, |
813 | }; | 813 | }; |
814 | MODULE_ALIAS_MISCDEV(UINPUT_MINOR); | ||
815 | MODULE_ALIAS("devname:" UINPUT_NAME); | ||
814 | 816 | ||
815 | static int __init uinput_init(void) | 817 | static int __init uinput_init(void) |
816 | { | 818 | { |
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/mousedev.c b/drivers/input/mousedev.c index 83c24cca234..d528a2dba06 100644 --- a/drivers/input/mousedev.c +++ b/drivers/input/mousedev.c | |||
@@ -138,8 +138,8 @@ static void mousedev_touchpad_event(struct input_dev *dev, | |||
138 | 138 | ||
139 | fx(0) = value; | 139 | fx(0) = value; |
140 | if (mousedev->touch && mousedev->pkt_count >= 2) { | 140 | if (mousedev->touch && mousedev->pkt_count >= 2) { |
141 | size = input_abs_get_min(dev, ABS_X) - | 141 | size = input_abs_get_max(dev, ABS_X) - |
142 | input_abs_get_max(dev, ABS_X); | 142 | input_abs_get_min(dev, ABS_X); |
143 | if (size == 0) | 143 | if (size == 0) |
144 | size = 256 * 2; | 144 | size = 256 * 2; |
145 | 145 | ||
@@ -155,8 +155,8 @@ static void mousedev_touchpad_event(struct input_dev *dev, | |||
155 | fy(0) = value; | 155 | fy(0) = value; |
156 | if (mousedev->touch && mousedev->pkt_count >= 2) { | 156 | if (mousedev->touch && mousedev->pkt_count >= 2) { |
157 | /* use X size for ABS_Y to keep the same scale */ | 157 | /* use X size for ABS_Y to keep the same scale */ |
158 | size = input_abs_get_min(dev, ABS_X) - | 158 | size = input_abs_get_max(dev, ABS_X) - |
159 | input_abs_get_max(dev, ABS_X); | 159 | input_abs_get_min(dev, ABS_X); |
160 | if (size == 0) | 160 | if (size == 0) |
161 | size = 256 * 2; | 161 | size = 256 * 2; |
162 | 162 | ||
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 | ||
1486 | static void __exit i8042_exit(void) | 1486 | static 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 | } |