diff options
| author | Ingo Molnar <mingo@elte.hu> | 2010-10-18 12:43:43 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2010-10-18 12:43:46 -0400 |
| commit | f2f108eb4511f22a6f7568090cfcf4e7b2dc0f62 (patch) | |
| tree | 4b75771ec02543372808c7df31a1a65e37fdb361 /drivers/input | |
| parent | 756b0322e50aebc4b9afb4488a2d3f6c802b4e64 (diff) | |
| parent | 2b666ca4a68cbc22483b0f2e1ba3c0e59b01ae9e (diff) | |
Merge branch 'linus' into core/locking
Merge reason: Update to almost-final-.36
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/input')
| -rw-r--r-- | drivers/input/joydev.c | 3 | ||||
| -rw-r--r-- | drivers/input/misc/uinput.c | 7 | ||||
| -rw-r--r-- | drivers/input/tablet/wacom_sys.c | 23 | ||||
| -rw-r--r-- | drivers/input/tablet/wacom_wac.c | 4 |
4 files changed, 25 insertions, 12 deletions
diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c index d85bd8a7967d..22239e988498 100644 --- a/drivers/input/joydev.c +++ b/drivers/input/joydev.c | |||
| @@ -483,6 +483,9 @@ static int joydev_handle_JSIOCSAXMAP(struct joydev *joydev, | |||
| 483 | 483 | ||
| 484 | memcpy(joydev->abspam, abspam, len); | 484 | memcpy(joydev->abspam, abspam, len); |
| 485 | 485 | ||
| 486 | for (i = 0; i < joydev->nabs; i++) | ||
| 487 | joydev->absmap[joydev->abspam[i]] = i; | ||
| 488 | |||
| 486 | out: | 489 | out: |
| 487 | kfree(abspam); | 490 | kfree(abspam); |
| 488 | return retval; | 491 | return retval; |
diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c index 0d4266a533a5..360698553eb5 100644 --- a/drivers/input/misc/uinput.c +++ b/drivers/input/misc/uinput.c | |||
| @@ -404,6 +404,13 @@ static int uinput_setup_device(struct uinput_device *udev, const char __user *bu | |||
| 404 | retval = uinput_validate_absbits(dev); | 404 | retval = uinput_validate_absbits(dev); |
| 405 | if (retval < 0) | 405 | if (retval < 0) |
| 406 | goto exit; | 406 | goto exit; |
| 407 | if (test_bit(ABS_MT_SLOT, dev->absbit)) { | ||
| 408 | int nslot = input_abs_get_max(dev, ABS_MT_SLOT) + 1; | ||
| 409 | input_mt_create_slots(dev, nslot); | ||
| 410 | input_set_events_per_packet(dev, 6 * nslot); | ||
| 411 | } else if (test_bit(ABS_MT_POSITION_X, dev->absbit)) { | ||
| 412 | input_set_events_per_packet(dev, 60); | ||
| 413 | } | ||
| 407 | } | 414 | } |
| 408 | 415 | ||
| 409 | udev->state = UIST_SETUP_COMPLETE; | 416 | udev->state = UIST_SETUP_COMPLETE; |
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c index 42ba3691d908..b35876ee6908 100644 --- a/drivers/input/tablet/wacom_sys.c +++ b/drivers/input/tablet/wacom_sys.c | |||
| @@ -103,27 +103,26 @@ static void wacom_sys_irq(struct urb *urb) | |||
| 103 | static int wacom_open(struct input_dev *dev) | 103 | static int wacom_open(struct input_dev *dev) |
| 104 | { | 104 | { |
| 105 | struct wacom *wacom = input_get_drvdata(dev); | 105 | struct wacom *wacom = input_get_drvdata(dev); |
| 106 | int retval = 0; | ||
| 106 | 107 | ||
| 107 | mutex_lock(&wacom->lock); | 108 | if (usb_autopm_get_interface(wacom->intf) < 0) |
| 108 | |||
| 109 | wacom->irq->dev = wacom->usbdev; | ||
| 110 | |||
| 111 | if (usb_autopm_get_interface(wacom->intf) < 0) { | ||
| 112 | mutex_unlock(&wacom->lock); | ||
| 113 | return -EIO; | 109 | return -EIO; |
| 114 | } | 110 | |
| 111 | mutex_lock(&wacom->lock); | ||
| 115 | 112 | ||
| 116 | if (usb_submit_urb(wacom->irq, GFP_KERNEL)) { | 113 | if (usb_submit_urb(wacom->irq, GFP_KERNEL)) { |
| 117 | usb_autopm_put_interface(wacom->intf); | 114 | retval = -EIO; |
| 118 | mutex_unlock(&wacom->lock); | 115 | goto out; |
| 119 | return -EIO; | ||
| 120 | } | 116 | } |
| 121 | 117 | ||
| 122 | wacom->open = true; | 118 | wacom->open = true; |
| 123 | wacom->intf->needs_remote_wakeup = 1; | 119 | wacom->intf->needs_remote_wakeup = 1; |
| 124 | 120 | ||
| 121 | out: | ||
| 125 | mutex_unlock(&wacom->lock); | 122 | mutex_unlock(&wacom->lock); |
| 126 | return 0; | 123 | if (retval) |
| 124 | usb_autopm_put_interface(wacom->intf); | ||
| 125 | return retval; | ||
| 127 | } | 126 | } |
| 128 | 127 | ||
| 129 | static void wacom_close(struct input_dev *dev) | 128 | static void wacom_close(struct input_dev *dev) |
| @@ -135,6 +134,8 @@ static void wacom_close(struct input_dev *dev) | |||
| 135 | wacom->open = false; | 134 | wacom->open = false; |
| 136 | wacom->intf->needs_remote_wakeup = 0; | 135 | wacom->intf->needs_remote_wakeup = 0; |
| 137 | mutex_unlock(&wacom->lock); | 136 | mutex_unlock(&wacom->lock); |
| 137 | |||
| 138 | usb_autopm_put_interface(wacom->intf); | ||
| 138 | } | 139 | } |
| 139 | 140 | ||
| 140 | static int wacom_parse_hid(struct usb_interface *intf, struct hid_descriptor *hid_desc, | 141 | static int wacom_parse_hid(struct usb_interface *intf, struct hid_descriptor *hid_desc, |
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index 6e29badb969e..47fd7a041c52 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c | |||
| @@ -442,8 +442,10 @@ static void wacom_intuos_general(struct wacom_wac *wacom) | |||
| 442 | /* general pen packet */ | 442 | /* general pen packet */ |
| 443 | if ((data[1] & 0xb8) == 0xa0) { | 443 | if ((data[1] & 0xb8) == 0xa0) { |
| 444 | t = (data[6] << 2) | ((data[7] >> 6) & 3); | 444 | t = (data[6] << 2) | ((data[7] >> 6) & 3); |
| 445 | if (features->type >= INTUOS4S && features->type <= INTUOS4L) | 445 | if ((features->type >= INTUOS4S && features->type <= INTUOS4L) || |
| 446 | features->type == WACOM_21UX2) { | ||
| 446 | t = (t << 1) | (data[1] & 1); | 447 | t = (t << 1) | (data[1] & 1); |
| 448 | } | ||
| 447 | input_report_abs(input, ABS_PRESSURE, t); | 449 | input_report_abs(input, ABS_PRESSURE, t); |
| 448 | input_report_abs(input, ABS_TILT_X, | 450 | input_report_abs(input, ABS_TILT_X, |
| 449 | ((data[7] << 1) & 0x7e) | (data[8] >> 7)); | 451 | ((data[7] << 1) & 0x7e) | (data[8] >> 7)); |
