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: wacom - fix runtime PM related deadlock
Input: joydev - fix JSIOCSAXMAP ioctl
Input: uinput - setup MT usage during device creation

+22 -11
+3
drivers/input/joydev.c
··· 483 484 memcpy(joydev->abspam, abspam, len); 485 486 out: 487 kfree(abspam); 488 return retval;
··· 483 484 memcpy(joydev->abspam, abspam, len); 485 486 + for (i = 0; i < joydev->nabs; i++) 487 + joydev->absmap[joydev->abspam[i]] = i; 488 + 489 out: 490 kfree(abspam); 491 return retval;
+7
drivers/input/misc/uinput.c
··· 404 retval = uinput_validate_absbits(dev); 405 if (retval < 0) 406 goto exit; 407 } 408 409 udev->state = UIST_SETUP_COMPLETE;
··· 404 retval = uinput_validate_absbits(dev); 405 if (retval < 0) 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 + } 414 } 415 416 udev->state = UIST_SETUP_COMPLETE;
+12 -11
drivers/input/tablet/wacom_sys.c
··· 103 static int wacom_open(struct input_dev *dev) 104 { 105 struct wacom *wacom = input_get_drvdata(dev); 106 107 mutex_lock(&wacom->lock); 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; 114 - } 115 - 116 if (usb_submit_urb(wacom->irq, GFP_KERNEL)) { 117 - usb_autopm_put_interface(wacom->intf); 118 - mutex_unlock(&wacom->lock); 119 - return -EIO; 120 } 121 122 wacom->open = true; 123 wacom->intf->needs_remote_wakeup = 1; 124 125 mutex_unlock(&wacom->lock); 126 - return 0; 127 } 128 129 static void wacom_close(struct input_dev *dev) ··· 134 wacom->open = false; 135 wacom->intf->needs_remote_wakeup = 0; 136 mutex_unlock(&wacom->lock); 137 } 138 139 static int wacom_parse_hid(struct usb_interface *intf, struct hid_descriptor *hid_desc,
··· 103 static int wacom_open(struct input_dev *dev) 104 { 105 struct wacom *wacom = input_get_drvdata(dev); 106 + int retval = 0; 107 + 108 + if (usb_autopm_get_interface(wacom->intf) < 0) 109 + return -EIO; 110 111 mutex_lock(&wacom->lock); 112 113 if (usb_submit_urb(wacom->irq, GFP_KERNEL)) { 114 + retval = -EIO; 115 + goto out; 116 } 117 118 wacom->open = true; 119 wacom->intf->needs_remote_wakeup = 1; 120 121 + out: 122 mutex_unlock(&wacom->lock); 123 + if (retval) 124 + usb_autopm_put_interface(wacom->intf); 125 + return retval; 126 } 127 128 static void wacom_close(struct input_dev *dev) ··· 135 wacom->open = false; 136 wacom->intf->needs_remote_wakeup = 0; 137 mutex_unlock(&wacom->lock); 138 + 139 + usb_autopm_put_interface(wacom->intf); 140 } 141 142 static int wacom_parse_hid(struct usb_interface *intf, struct hid_descriptor *hid_desc,