Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 27 May 2010 16:19:55 +0000 (09:19 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 27 May 2010 16:19:55 +0000 (09:19 -0700)
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: usbtouchscreen - support bigger iNexio touchscreens
  Input: ads7846 - return error on regulator_get() failure
  Input: twl4030-vibra - correct the power down sequence
  Input: enable onkey driver of max8925
  Input: use ABS_CNT rather than (ABS_MAX + 1)

1  2 
drivers/input/touchscreen/usbtouchscreen.c

@@@ -857,6 -857,11 +857,11 @@@ static int nexio_read_data(struct usbto
        if ((pkt[0] & 0xe0) != 0xe0)
                return 0;
  
+       if (be16_to_cpu(packet->data_len) > 0xff)
+               packet->data_len = cpu_to_be16(be16_to_cpu(packet->data_len) - 0x100);
+       if (be16_to_cpu(packet->x_len) > 0xff)
+               packet->x_len = cpu_to_be16(be16_to_cpu(packet->x_len) - 0x80);
        /* send ACK */
        ret = usb_submit_urb(priv->ack, GFP_ATOMIC);
  
@@@ -1112,7 -1117,7 +1117,7 @@@ static struct usbtouch_device_info usbt
  
  #ifdef CONFIG_TOUCHSCREEN_USB_NEXIO
        [DEVTYPE_NEXIO] = {
-               .rept_size      = 128,
+               .rept_size      = 1024,
                .irq_always     = true,
                .read_data      = nexio_read_data,
                .init           = nexio_init,
@@@ -1290,8 -1295,8 +1295,8 @@@ static void usbtouch_close(struct input
  static void usbtouch_free_buffers(struct usb_device *udev,
                                  struct usbtouch_usb *usbtouch)
  {
 -      usb_buffer_free(udev, usbtouch->type->rept_size,
 -                      usbtouch->data, usbtouch->data_dma);
 +      usb_free_coherent(udev, usbtouch->type->rept_size,
 +                        usbtouch->data, usbtouch->data_dma);
        kfree(usbtouch->buffer);
  }
  
@@@ -1335,8 -1340,8 +1340,8 @@@ static int usbtouch_probe(struct usb_in
        if (!type->process_pkt)
                type->process_pkt = usbtouch_process_pkt;
  
 -      usbtouch->data = usb_buffer_alloc(udev, type->rept_size,
 -                                        GFP_KERNEL, &usbtouch->data_dma);
 +      usbtouch->data = usb_alloc_coherent(udev, type->rept_size,
 +                                          GFP_KERNEL, &usbtouch->data_dma);
        if (!usbtouch->data)
                goto out_free;