Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
[pandora-kernel.git] / drivers / input / touchscreen / usbtouchscreen.c
index 99330bb..29a8bbf 100644 (file)
@@ -811,12 +811,11 @@ static int nexio_init(struct usbtouch_usb *usbtouch)
 
        priv = usbtouch->priv;
 
-       priv->ack_buf = kmalloc(sizeof(nexio_ack_pkt), GFP_KERNEL);
+       priv->ack_buf = kmemdup(nexio_ack_pkt, sizeof(nexio_ack_pkt),
+                               GFP_KERNEL);
        if (!priv->ack_buf)
                goto err_priv;
 
-       memcpy(priv->ack_buf, nexio_ack_pkt, sizeof(nexio_ack_pkt));
-
        priv->ack = usb_alloc_urb(0, GFP_KERNEL);
        if (!priv->ack) {
                dbg("%s - usb_alloc_urb failed: usbtouch->ack", __func__);
@@ -1291,8 +1290,8 @@ static void usbtouch_close(struct input_dev *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);
 }
 
@@ -1336,8 +1335,8 @@ static int usbtouch_probe(struct usb_interface *intf,
        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;