aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorDaniel Mack <daniel@caiaq.de>2010-04-12 07:17:25 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-20 16:21:38 -0400
commit997ea58eb92f9970b8af7aae48800d0ef43b9423 (patch)
tree65e021973e5a48ad7290d5be1f441940566468ad /drivers/input
parent48679c6d772b1459a2945729e3a1256ac78fcabf (diff)
USB: rename usb_buffer_alloc() and usb_buffer_free() users
For more clearance what the functions actually do, usb_buffer_alloc() is renamed to usb_alloc_coherent() usb_buffer_free() is renamed to usb_free_coherent() They should only be used in code which really needs DMA coherency. All call sites have been changed accordingly, except for staging drivers. Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Pedro Ribeiro <pedrib@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/joystick/xpad.c16
-rw-r--r--drivers/input/misc/ati_remote.c12
-rw-r--r--drivers/input/misc/ati_remote2.c4
-rw-r--r--drivers/input/misc/cm109.c16
-rw-r--r--drivers/input/misc/keyspan_remote.c6
-rw-r--r--drivers/input/misc/powermate.c8
-rw-r--r--drivers/input/misc/yealink.c14
-rw-r--r--drivers/input/mouse/appletouch.c12
-rw-r--r--drivers/input/mouse/bcm5974.c24
-rw-r--r--drivers/input/tablet/acecad.c6
-rw-r--r--drivers/input/tablet/aiptek.c14
-rw-r--r--drivers/input/tablet/gtco.c12
-rw-r--r--drivers/input/tablet/kbtab.c6
-rw-r--r--drivers/input/tablet/wacom_sys.c10
-rw-r--r--drivers/input/touchscreen/usbtouchscreen.c8
15 files changed, 83 insertions, 85 deletions
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index 9b3353b404da..c1087ce4cef9 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -533,8 +533,8 @@ static int xpad_init_output(struct usb_interface *intf, struct usb_xpad *xpad)
533 if (xpad->xtype != XTYPE_XBOX360 && xpad->xtype != XTYPE_XBOX) 533 if (xpad->xtype != XTYPE_XBOX360 && xpad->xtype != XTYPE_XBOX)
534 return 0; 534 return 0;
535 535
536 xpad->odata = usb_buffer_alloc(xpad->udev, XPAD_PKT_LEN, 536 xpad->odata = usb_alloc_coherent(xpad->udev, XPAD_PKT_LEN,
537 GFP_KERNEL, &xpad->odata_dma); 537 GFP_KERNEL, &xpad->odata_dma);
538 if (!xpad->odata) 538 if (!xpad->odata)
539 goto fail1; 539 goto fail1;
540 540
@@ -554,7 +554,7 @@ static int xpad_init_output(struct usb_interface *intf, struct usb_xpad *xpad)
554 554
555 return 0; 555 return 0;
556 556
557 fail2: usb_buffer_free(xpad->udev, XPAD_PKT_LEN, xpad->odata, xpad->odata_dma); 557 fail2: usb_free_coherent(xpad->udev, XPAD_PKT_LEN, xpad->odata, xpad->odata_dma);
558 fail1: return error; 558 fail1: return error;
559} 559}
560 560
@@ -568,7 +568,7 @@ static void xpad_deinit_output(struct usb_xpad *xpad)
568{ 568{
569 if (xpad->xtype == XTYPE_XBOX360 || xpad->xtype == XTYPE_XBOX) { 569 if (xpad->xtype == XTYPE_XBOX360 || xpad->xtype == XTYPE_XBOX) {
570 usb_free_urb(xpad->irq_out); 570 usb_free_urb(xpad->irq_out);
571 usb_buffer_free(xpad->udev, XPAD_PKT_LEN, 571 usb_free_coherent(xpad->udev, XPAD_PKT_LEN,
572 xpad->odata, xpad->odata_dma); 572 xpad->odata, xpad->odata_dma);
573 } 573 }
574} 574}
@@ -788,8 +788,8 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id
788 if (!xpad || !input_dev) 788 if (!xpad || !input_dev)
789 goto fail1; 789 goto fail1;
790 790
791 xpad->idata = usb_buffer_alloc(udev, XPAD_PKT_LEN, 791 xpad->idata = usb_alloc_coherent(udev, XPAD_PKT_LEN,
792 GFP_KERNEL, &xpad->idata_dma); 792 GFP_KERNEL, &xpad->idata_dma);
793 if (!xpad->idata) 793 if (!xpad->idata)
794 goto fail1; 794 goto fail1;
795 795
@@ -942,7 +942,7 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id
942 fail5: usb_kill_urb(xpad->irq_in); 942 fail5: usb_kill_urb(xpad->irq_in);
943 fail4: usb_free_urb(xpad->irq_in); 943 fail4: usb_free_urb(xpad->irq_in);
944 fail3: xpad_deinit_output(xpad); 944 fail3: xpad_deinit_output(xpad);
945 fail2: usb_buffer_free(udev, XPAD_PKT_LEN, xpad->idata, xpad->idata_dma); 945 fail2: usb_free_coherent(udev, XPAD_PKT_LEN, xpad->idata, xpad->idata_dma);
946 fail1: input_free_device(input_dev); 946 fail1: input_free_device(input_dev);
947 kfree(xpad); 947 kfree(xpad);
948 return error; 948 return error;
@@ -964,7 +964,7 @@ static void xpad_disconnect(struct usb_interface *intf)
964 usb_kill_urb(xpad->irq_in); 964 usb_kill_urb(xpad->irq_in);
965 } 965 }
966 usb_free_urb(xpad->irq_in); 966 usb_free_urb(xpad->irq_in);
967 usb_buffer_free(xpad->udev, XPAD_PKT_LEN, 967 usb_free_coherent(xpad->udev, XPAD_PKT_LEN,
968 xpad->idata, xpad->idata_dma); 968 xpad->idata, xpad->idata_dma);
969 kfree(xpad); 969 kfree(xpad);
970 } 970 }
diff --git a/drivers/input/misc/ati_remote.c b/drivers/input/misc/ati_remote.c
index e8bbc619f6df..bce57129afba 100644
--- a/drivers/input/misc/ati_remote.c
+++ b/drivers/input/misc/ati_remote.c
@@ -624,13 +624,13 @@ static void ati_remote_irq_in(struct urb *urb)
624static int ati_remote_alloc_buffers(struct usb_device *udev, 624static int ati_remote_alloc_buffers(struct usb_device *udev,
625 struct ati_remote *ati_remote) 625 struct ati_remote *ati_remote)
626{ 626{
627 ati_remote->inbuf = usb_buffer_alloc(udev, DATA_BUFSIZE, GFP_ATOMIC, 627 ati_remote->inbuf = usb_alloc_coherent(udev, DATA_BUFSIZE, GFP_ATOMIC,
628 &ati_remote->inbuf_dma); 628 &ati_remote->inbuf_dma);
629 if (!ati_remote->inbuf) 629 if (!ati_remote->inbuf)
630 return -1; 630 return -1;
631 631
632 ati_remote->outbuf = usb_buffer_alloc(udev, DATA_BUFSIZE, GFP_ATOMIC, 632 ati_remote->outbuf = usb_alloc_coherent(udev, DATA_BUFSIZE, GFP_ATOMIC,
633 &ati_remote->outbuf_dma); 633 &ati_remote->outbuf_dma);
634 if (!ati_remote->outbuf) 634 if (!ati_remote->outbuf)
635 return -1; 635 return -1;
636 636
@@ -653,10 +653,10 @@ static void ati_remote_free_buffers(struct ati_remote *ati_remote)
653 usb_free_urb(ati_remote->irq_urb); 653 usb_free_urb(ati_remote->irq_urb);
654 usb_free_urb(ati_remote->out_urb); 654 usb_free_urb(ati_remote->out_urb);
655 655
656 usb_buffer_free(ati_remote->udev, DATA_BUFSIZE, 656 usb_free_coherent(ati_remote->udev, DATA_BUFSIZE,
657 ati_remote->inbuf, ati_remote->inbuf_dma); 657 ati_remote->inbuf, ati_remote->inbuf_dma);
658 658
659 usb_buffer_free(ati_remote->udev, DATA_BUFSIZE, 659 usb_free_coherent(ati_remote->udev, DATA_BUFSIZE,
660 ati_remote->outbuf, ati_remote->outbuf_dma); 660 ati_remote->outbuf, ati_remote->outbuf_dma);
661} 661}
662 662
diff --git a/drivers/input/misc/ati_remote2.c b/drivers/input/misc/ati_remote2.c
index 2124b99378bb..e148749b5851 100644
--- a/drivers/input/misc/ati_remote2.c
+++ b/drivers/input/misc/ati_remote2.c
@@ -589,7 +589,7 @@ static int ati_remote2_urb_init(struct ati_remote2 *ar2)
589 int i, pipe, maxp; 589 int i, pipe, maxp;
590 590
591 for (i = 0; i < 2; i++) { 591 for (i = 0; i < 2; i++) {
592 ar2->buf[i] = usb_buffer_alloc(udev, 4, GFP_KERNEL, &ar2->buf_dma[i]); 592 ar2->buf[i] = usb_alloc_coherent(udev, 4, GFP_KERNEL, &ar2->buf_dma[i]);
593 if (!ar2->buf[i]) 593 if (!ar2->buf[i])
594 return -ENOMEM; 594 return -ENOMEM;
595 595
@@ -617,7 +617,7 @@ static void ati_remote2_urb_cleanup(struct ati_remote2 *ar2)
617 617
618 for (i = 0; i < 2; i++) { 618 for (i = 0; i < 2; i++) {
619 usb_free_urb(ar2->urb[i]); 619 usb_free_urb(ar2->urb[i]);
620 usb_buffer_free(ar2->udev, 4, ar2->buf[i], ar2->buf_dma[i]); 620 usb_free_coherent(ar2->udev, 4, ar2->buf[i], ar2->buf_dma[i]);
621 } 621 }
622} 622}
623 623
diff --git a/drivers/input/misc/cm109.c b/drivers/input/misc/cm109.c
index 8d2d291ee508..2b0eba6619bd 100644
--- a/drivers/input/misc/cm109.c
+++ b/drivers/input/misc/cm109.c
@@ -630,11 +630,11 @@ static void cm109_usb_cleanup(struct cm109_dev *dev)
630{ 630{
631 kfree(dev->ctl_req); 631 kfree(dev->ctl_req);
632 if (dev->ctl_data) 632 if (dev->ctl_data)
633 usb_buffer_free(dev->udev, USB_PKT_LEN, 633 usb_free_coherent(dev->udev, USB_PKT_LEN,
634 dev->ctl_data, dev->ctl_dma); 634 dev->ctl_data, dev->ctl_dma);
635 if (dev->irq_data) 635 if (dev->irq_data)
636 usb_buffer_free(dev->udev, USB_PKT_LEN, 636 usb_free_coherent(dev->udev, USB_PKT_LEN,
637 dev->irq_data, dev->irq_dma); 637 dev->irq_data, dev->irq_dma);
638 638
639 usb_free_urb(dev->urb_irq); /* parameter validation in core/urb */ 639 usb_free_urb(dev->urb_irq); /* parameter validation in core/urb */
640 usb_free_urb(dev->urb_ctl); /* parameter validation in core/urb */ 640 usb_free_urb(dev->urb_ctl); /* parameter validation in core/urb */
@@ -683,13 +683,13 @@ static int cm109_usb_probe(struct usb_interface *intf,
683 goto err_out; 683 goto err_out;
684 684
685 /* allocate usb buffers */ 685 /* allocate usb buffers */
686 dev->irq_data = usb_buffer_alloc(udev, USB_PKT_LEN, 686 dev->irq_data = usb_alloc_coherent(udev, USB_PKT_LEN,
687 GFP_KERNEL, &dev->irq_dma); 687 GFP_KERNEL, &dev->irq_dma);
688 if (!dev->irq_data) 688 if (!dev->irq_data)
689 goto err_out; 689 goto err_out;
690 690
691 dev->ctl_data = usb_buffer_alloc(udev, USB_PKT_LEN, 691 dev->ctl_data = usb_alloc_coherent(udev, USB_PKT_LEN,
692 GFP_KERNEL, &dev->ctl_dma); 692 GFP_KERNEL, &dev->ctl_dma);
693 if (!dev->ctl_data) 693 if (!dev->ctl_data)
694 goto err_out; 694 goto err_out;
695 695
diff --git a/drivers/input/misc/keyspan_remote.c b/drivers/input/misc/keyspan_remote.c
index 86afdd1fdf9d..a93c525475c6 100644
--- a/drivers/input/misc/keyspan_remote.c
+++ b/drivers/input/misc/keyspan_remote.c
@@ -464,7 +464,7 @@ static int keyspan_probe(struct usb_interface *interface, const struct usb_devic
464 remote->in_endpoint = endpoint; 464 remote->in_endpoint = endpoint;
465 remote->toggle = -1; /* Set to -1 so we will always not match the toggle from the first remote message. */ 465 remote->toggle = -1; /* Set to -1 so we will always not match the toggle from the first remote message. */
466 466
467 remote->in_buffer = usb_buffer_alloc(udev, RECV_SIZE, GFP_ATOMIC, &remote->in_dma); 467 remote->in_buffer = usb_alloc_coherent(udev, RECV_SIZE, GFP_ATOMIC, &remote->in_dma);
468 if (!remote->in_buffer) { 468 if (!remote->in_buffer) {
469 error = -ENOMEM; 469 error = -ENOMEM;
470 goto fail1; 470 goto fail1;
@@ -543,7 +543,7 @@ static int keyspan_probe(struct usb_interface *interface, const struct usb_devic
543 return 0; 543 return 0;
544 544
545 fail3: usb_free_urb(remote->irq_urb); 545 fail3: usb_free_urb(remote->irq_urb);
546 fail2: usb_buffer_free(udev, RECV_SIZE, remote->in_buffer, remote->in_dma); 546 fail2: usb_free_coherent(udev, RECV_SIZE, remote->in_buffer, remote->in_dma);
547 fail1: kfree(remote); 547 fail1: kfree(remote);
548 input_free_device(input_dev); 548 input_free_device(input_dev);
549 549
@@ -564,7 +564,7 @@ static void keyspan_disconnect(struct usb_interface *interface)
564 input_unregister_device(remote->input); 564 input_unregister_device(remote->input);
565 usb_kill_urb(remote->irq_urb); 565 usb_kill_urb(remote->irq_urb);
566 usb_free_urb(remote->irq_urb); 566 usb_free_urb(remote->irq_urb);
567 usb_buffer_free(remote->udev, RECV_SIZE, remote->in_buffer, remote->in_dma); 567 usb_free_coherent(remote->udev, RECV_SIZE, remote->in_buffer, remote->in_dma);
568 kfree(remote); 568 kfree(remote);
569 } 569 }
570} 570}
diff --git a/drivers/input/misc/powermate.c b/drivers/input/misc/powermate.c
index 7ba4b5f53fc2..bf170f6b4422 100644
--- a/drivers/input/misc/powermate.c
+++ b/drivers/input/misc/powermate.c
@@ -273,8 +273,8 @@ static int powermate_input_event(struct input_dev *dev, unsigned int type, unsig
273 273
274static int powermate_alloc_buffers(struct usb_device *udev, struct powermate_device *pm) 274static int powermate_alloc_buffers(struct usb_device *udev, struct powermate_device *pm)
275{ 275{
276 pm->data = usb_buffer_alloc(udev, POWERMATE_PAYLOAD_SIZE_MAX, 276 pm->data = usb_alloc_coherent(udev, POWERMATE_PAYLOAD_SIZE_MAX,
277 GFP_ATOMIC, &pm->data_dma); 277 GFP_ATOMIC, &pm->data_dma);
278 if (!pm->data) 278 if (!pm->data)
279 return -1; 279 return -1;
280 280
@@ -287,8 +287,8 @@ static int powermate_alloc_buffers(struct usb_device *udev, struct powermate_dev
287 287
288static void powermate_free_buffers(struct usb_device *udev, struct powermate_device *pm) 288static void powermate_free_buffers(struct usb_device *udev, struct powermate_device *pm)
289{ 289{
290 usb_buffer_free(udev, POWERMATE_PAYLOAD_SIZE_MAX, 290 usb_free_coherent(udev, POWERMATE_PAYLOAD_SIZE_MAX,
291 pm->data, pm->data_dma); 291 pm->data, pm->data_dma);
292 kfree(pm->configcr); 292 kfree(pm->configcr);
293} 293}
294 294
diff --git a/drivers/input/misc/yealink.c b/drivers/input/misc/yealink.c
index 2828328e9dd0..41201c6b5e68 100644
--- a/drivers/input/misc/yealink.c
+++ b/drivers/input/misc/yealink.c
@@ -836,10 +836,8 @@ static int usb_cleanup(struct yealink_dev *yld, int err)
836 usb_free_urb(yld->urb_ctl); 836 usb_free_urb(yld->urb_ctl);
837 837
838 kfree(yld->ctl_req); 838 kfree(yld->ctl_req);
839 usb_buffer_free(yld->udev, USB_PKT_LEN, 839 usb_free_coherent(yld->udev, USB_PKT_LEN, yld->ctl_data, yld->ctl_dma);
840 yld->ctl_data, yld->ctl_dma); 840 usb_free_coherent(yld->udev, USB_PKT_LEN, yld->irq_data, yld->irq_dma);
841 usb_buffer_free(yld->udev, USB_PKT_LEN,
842 yld->irq_data, yld->irq_dma);
843 841
844 kfree(yld); 842 kfree(yld);
845 return err; 843 return err;
@@ -884,13 +882,13 @@ static int usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
884 return usb_cleanup(yld, -ENOMEM); 882 return usb_cleanup(yld, -ENOMEM);
885 883
886 /* allocate usb buffers */ 884 /* allocate usb buffers */
887 yld->irq_data = usb_buffer_alloc(udev, USB_PKT_LEN, 885 yld->irq_data = usb_alloc_coherent(udev, USB_PKT_LEN,
888 GFP_ATOMIC, &yld->irq_dma); 886 GFP_ATOMIC, &yld->irq_dma);
889 if (yld->irq_data == NULL) 887 if (yld->irq_data == NULL)
890 return usb_cleanup(yld, -ENOMEM); 888 return usb_cleanup(yld, -ENOMEM);
891 889
892 yld->ctl_data = usb_buffer_alloc(udev, USB_PKT_LEN, 890 yld->ctl_data = usb_alloc_coherent(udev, USB_PKT_LEN,
893 GFP_ATOMIC, &yld->ctl_dma); 891 GFP_ATOMIC, &yld->ctl_dma);
894 if (!yld->ctl_data) 892 if (!yld->ctl_data)
895 return usb_cleanup(yld, -ENOMEM); 893 return usb_cleanup(yld, -ENOMEM);
896 894
diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c
index 53ec7ddd1826..05edd75abca0 100644
--- a/drivers/input/mouse/appletouch.c
+++ b/drivers/input/mouse/appletouch.c
@@ -806,8 +806,8 @@ static int atp_probe(struct usb_interface *iface,
806 if (!dev->urb) 806 if (!dev->urb)
807 goto err_free_devs; 807 goto err_free_devs;
808 808
809 dev->data = usb_buffer_alloc(dev->udev, dev->info->datalen, GFP_KERNEL, 809 dev->data = usb_alloc_coherent(dev->udev, dev->info->datalen, GFP_KERNEL,
810 &dev->urb->transfer_dma); 810 &dev->urb->transfer_dma);
811 if (!dev->data) 811 if (!dev->data)
812 goto err_free_urb; 812 goto err_free_urb;
813 813
@@ -862,8 +862,8 @@ static int atp_probe(struct usb_interface *iface,
862 return 0; 862 return 0;
863 863
864 err_free_buffer: 864 err_free_buffer:
865 usb_buffer_free(dev->udev, dev->info->datalen, 865 usb_free_coherent(dev->udev, dev->info->datalen,
866 dev->data, dev->urb->transfer_dma); 866 dev->data, dev->urb->transfer_dma);
867 err_free_urb: 867 err_free_urb:
868 usb_free_urb(dev->urb); 868 usb_free_urb(dev->urb);
869 err_free_devs: 869 err_free_devs:
@@ -881,8 +881,8 @@ static void atp_disconnect(struct usb_interface *iface)
881 if (dev) { 881 if (dev) {
882 usb_kill_urb(dev->urb); 882 usb_kill_urb(dev->urb);
883 input_unregister_device(dev->input); 883 input_unregister_device(dev->input);
884 usb_buffer_free(dev->udev, dev->info->datalen, 884 usb_free_coherent(dev->udev, dev->info->datalen,
885 dev->data, dev->urb->transfer_dma); 885 dev->data, dev->urb->transfer_dma);
886 usb_free_urb(dev->urb); 886 usb_free_urb(dev->urb);
887 kfree(dev); 887 kfree(dev);
888 } 888 }
diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c
index b89879bd860f..6dedded27222 100644
--- a/drivers/input/mouse/bcm5974.c
+++ b/drivers/input/mouse/bcm5974.c
@@ -715,15 +715,15 @@ static int bcm5974_probe(struct usb_interface *iface,
715 if (!dev->tp_urb) 715 if (!dev->tp_urb)
716 goto err_free_bt_urb; 716 goto err_free_bt_urb;
717 717
718 dev->bt_data = usb_buffer_alloc(dev->udev, 718 dev->bt_data = usb_alloc_coherent(dev->udev,
719 dev->cfg.bt_datalen, GFP_KERNEL, 719 dev->cfg.bt_datalen, GFP_KERNEL,
720 &dev->bt_urb->transfer_dma); 720 &dev->bt_urb->transfer_dma);
721 if (!dev->bt_data) 721 if (!dev->bt_data)
722 goto err_free_urb; 722 goto err_free_urb;
723 723
724 dev->tp_data = usb_buffer_alloc(dev->udev, 724 dev->tp_data = usb_alloc_coherent(dev->udev,
725 dev->cfg.tp_datalen, GFP_KERNEL, 725 dev->cfg.tp_datalen, GFP_KERNEL,
726 &dev->tp_urb->transfer_dma); 726 &dev->tp_urb->transfer_dma);
727 if (!dev->tp_data) 727 if (!dev->tp_data)
728 goto err_free_bt_buffer; 728 goto err_free_bt_buffer;
729 729
@@ -765,10 +765,10 @@ static int bcm5974_probe(struct usb_interface *iface,
765 return 0; 765 return 0;
766 766
767err_free_buffer: 767err_free_buffer:
768 usb_buffer_free(dev->udev, dev->cfg.tp_datalen, 768 usb_free_coherent(dev->udev, dev->cfg.tp_datalen,
769 dev->tp_data, dev->tp_urb->transfer_dma); 769 dev->tp_data, dev->tp_urb->transfer_dma);
770err_free_bt_buffer: 770err_free_bt_buffer:
771 usb_buffer_free(dev->udev, dev->cfg.bt_datalen, 771 usb_free_coherent(dev->udev, dev->cfg.bt_datalen,
772 dev->bt_data, dev->bt_urb->transfer_dma); 772 dev->bt_data, dev->bt_urb->transfer_dma);
773err_free_urb: 773err_free_urb:
774 usb_free_urb(dev->tp_urb); 774 usb_free_urb(dev->tp_urb);
@@ -788,10 +788,10 @@ static void bcm5974_disconnect(struct usb_interface *iface)
788 usb_set_intfdata(iface, NULL); 788 usb_set_intfdata(iface, NULL);
789 789
790 input_unregister_device(dev->input); 790 input_unregister_device(dev->input);
791 usb_buffer_free(dev->udev, dev->cfg.tp_datalen, 791 usb_free_coherent(dev->udev, dev->cfg.tp_datalen,
792 dev->tp_data, dev->tp_urb->transfer_dma); 792 dev->tp_data, dev->tp_urb->transfer_dma);
793 usb_buffer_free(dev->udev, dev->cfg.bt_datalen, 793 usb_free_coherent(dev->udev, dev->cfg.bt_datalen,
794 dev->bt_data, dev->bt_urb->transfer_dma); 794 dev->bt_data, dev->bt_urb->transfer_dma);
795 usb_free_urb(dev->tp_urb); 795 usb_free_urb(dev->tp_urb);
796 usb_free_urb(dev->bt_urb); 796 usb_free_urb(dev->bt_urb);
797 kfree(dev); 797 kfree(dev);
diff --git a/drivers/input/tablet/acecad.c b/drivers/input/tablet/acecad.c
index 670c61c5a516..c0470163dc67 100644
--- a/drivers/input/tablet/acecad.c
+++ b/drivers/input/tablet/acecad.c
@@ -155,7 +155,7 @@ static int usb_acecad_probe(struct usb_interface *intf, const struct usb_device_
155 goto fail1; 155 goto fail1;
156 } 156 }
157 157
158 acecad->data = usb_buffer_alloc(dev, 8, GFP_KERNEL, &acecad->data_dma); 158 acecad->data = usb_alloc_coherent(dev, 8, GFP_KERNEL, &acecad->data_dma);
159 if (!acecad->data) { 159 if (!acecad->data) {
160 err= -ENOMEM; 160 err= -ENOMEM;
161 goto fail1; 161 goto fail1;
@@ -241,7 +241,7 @@ static int usb_acecad_probe(struct usb_interface *intf, const struct usb_device_
241 241
242 return 0; 242 return 0;
243 243
244 fail2: usb_buffer_free(dev, 8, acecad->data, acecad->data_dma); 244 fail2: usb_free_coherent(dev, 8, acecad->data, acecad->data_dma);
245 fail1: input_free_device(input_dev); 245 fail1: input_free_device(input_dev);
246 kfree(acecad); 246 kfree(acecad);
247 return err; 247 return err;
@@ -256,7 +256,7 @@ static void usb_acecad_disconnect(struct usb_interface *intf)
256 usb_kill_urb(acecad->irq); 256 usb_kill_urb(acecad->irq);
257 input_unregister_device(acecad->input); 257 input_unregister_device(acecad->input);
258 usb_free_urb(acecad->irq); 258 usb_free_urb(acecad->irq);
259 usb_buffer_free(interface_to_usbdev(intf), 10, acecad->data, acecad->data_dma); 259 usb_free_coherent(interface_to_usbdev(intf), 10, acecad->data, acecad->data_dma);
260 kfree(acecad); 260 kfree(acecad);
261 } 261 }
262} 262}
diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c
index 4be039d7dcad..51b80b08d467 100644
--- a/drivers/input/tablet/aiptek.c
+++ b/drivers/input/tablet/aiptek.c
@@ -1711,8 +1711,8 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id)
1711 goto fail1; 1711 goto fail1;
1712 } 1712 }
1713 1713
1714 aiptek->data = usb_buffer_alloc(usbdev, AIPTEK_PACKET_LENGTH, 1714 aiptek->data = usb_alloc_coherent(usbdev, AIPTEK_PACKET_LENGTH,
1715 GFP_ATOMIC, &aiptek->data_dma); 1715 GFP_ATOMIC, &aiptek->data_dma);
1716 if (!aiptek->data) { 1716 if (!aiptek->data) {
1717 dev_warn(&intf->dev, "cannot allocate usb buffer\n"); 1717 dev_warn(&intf->dev, "cannot allocate usb buffer\n");
1718 goto fail1; 1718 goto fail1;
@@ -1884,8 +1884,8 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id)
1884 1884
1885 fail4: sysfs_remove_group(&intf->dev.kobj, &aiptek_attribute_group); 1885 fail4: sysfs_remove_group(&intf->dev.kobj, &aiptek_attribute_group);
1886 fail3: usb_free_urb(aiptek->urb); 1886 fail3: usb_free_urb(aiptek->urb);
1887 fail2: usb_buffer_free(usbdev, AIPTEK_PACKET_LENGTH, aiptek->data, 1887 fail2: usb_free_coherent(usbdev, AIPTEK_PACKET_LENGTH, aiptek->data,
1888 aiptek->data_dma); 1888 aiptek->data_dma);
1889 fail1: usb_set_intfdata(intf, NULL); 1889 fail1: usb_set_intfdata(intf, NULL);
1890 input_free_device(inputdev); 1890 input_free_device(inputdev);
1891 kfree(aiptek); 1891 kfree(aiptek);
@@ -1909,9 +1909,9 @@ static void aiptek_disconnect(struct usb_interface *intf)
1909 input_unregister_device(aiptek->inputdev); 1909 input_unregister_device(aiptek->inputdev);
1910 sysfs_remove_group(&intf->dev.kobj, &aiptek_attribute_group); 1910 sysfs_remove_group(&intf->dev.kobj, &aiptek_attribute_group);
1911 usb_free_urb(aiptek->urb); 1911 usb_free_urb(aiptek->urb);
1912 usb_buffer_free(interface_to_usbdev(intf), 1912 usb_free_coherent(interface_to_usbdev(intf),
1913 AIPTEK_PACKET_LENGTH, 1913 AIPTEK_PACKET_LENGTH,
1914 aiptek->data, aiptek->data_dma); 1914 aiptek->data, aiptek->data_dma);
1915 kfree(aiptek); 1915 kfree(aiptek);
1916 } 1916 }
1917} 1917}
diff --git a/drivers/input/tablet/gtco.c b/drivers/input/tablet/gtco.c
index 866a9ee1af1a..8ea6afe2e992 100644
--- a/drivers/input/tablet/gtco.c
+++ b/drivers/input/tablet/gtco.c
@@ -850,8 +850,8 @@ static int gtco_probe(struct usb_interface *usbinterface,
850 gtco->usbdev = usb_get_dev(interface_to_usbdev(usbinterface)); 850 gtco->usbdev = usb_get_dev(interface_to_usbdev(usbinterface));
851 851
852 /* Allocate some data for incoming reports */ 852 /* Allocate some data for incoming reports */
853 gtco->buffer = usb_buffer_alloc(gtco->usbdev, REPORT_MAX_SIZE, 853 gtco->buffer = usb_alloc_coherent(gtco->usbdev, REPORT_MAX_SIZE,
854 GFP_KERNEL, &gtco->buf_dma); 854 GFP_KERNEL, &gtco->buf_dma);
855 if (!gtco->buffer) { 855 if (!gtco->buffer) {
856 err("No more memory for us buffers"); 856 err("No more memory for us buffers");
857 error = -ENOMEM; 857 error = -ENOMEM;
@@ -982,8 +982,8 @@ static int gtco_probe(struct usb_interface *usbinterface,
982 err_free_urb: 982 err_free_urb:
983 usb_free_urb(gtco->urbinfo); 983 usb_free_urb(gtco->urbinfo);
984 err_free_buf: 984 err_free_buf:
985 usb_buffer_free(gtco->usbdev, REPORT_MAX_SIZE, 985 usb_free_coherent(gtco->usbdev, REPORT_MAX_SIZE,
986 gtco->buffer, gtco->buf_dma); 986 gtco->buffer, gtco->buf_dma);
987 err_free_devs: 987 err_free_devs:
988 input_free_device(input_dev); 988 input_free_device(input_dev);
989 kfree(gtco); 989 kfree(gtco);
@@ -1005,8 +1005,8 @@ static void gtco_disconnect(struct usb_interface *interface)
1005 input_unregister_device(gtco->inputdevice); 1005 input_unregister_device(gtco->inputdevice);
1006 usb_kill_urb(gtco->urbinfo); 1006 usb_kill_urb(gtco->urbinfo);
1007 usb_free_urb(gtco->urbinfo); 1007 usb_free_urb(gtco->urbinfo);
1008 usb_buffer_free(gtco->usbdev, REPORT_MAX_SIZE, 1008 usb_free_coherent(gtco->usbdev, REPORT_MAX_SIZE,
1009 gtco->buffer, gtco->buf_dma); 1009 gtco->buffer, gtco->buf_dma);
1010 kfree(gtco); 1010 kfree(gtco);
1011 } 1011 }
1012 1012
diff --git a/drivers/input/tablet/kbtab.c b/drivers/input/tablet/kbtab.c
index 6682b17bf844..d31b9c793554 100644
--- a/drivers/input/tablet/kbtab.c
+++ b/drivers/input/tablet/kbtab.c
@@ -129,7 +129,7 @@ static int kbtab_probe(struct usb_interface *intf, const struct usb_device_id *i
129 if (!kbtab || !input_dev) 129 if (!kbtab || !input_dev)
130 goto fail1; 130 goto fail1;
131 131
132 kbtab->data = usb_buffer_alloc(dev, 8, GFP_KERNEL, &kbtab->data_dma); 132 kbtab->data = usb_alloc_coherent(dev, 8, GFP_KERNEL, &kbtab->data_dma);
133 if (!kbtab->data) 133 if (!kbtab->data)
134 goto fail1; 134 goto fail1;
135 135
@@ -182,7 +182,7 @@ static int kbtab_probe(struct usb_interface *intf, const struct usb_device_id *i
182 return 0; 182 return 0;
183 183
184 fail3: usb_free_urb(kbtab->irq); 184 fail3: usb_free_urb(kbtab->irq);
185 fail2: usb_buffer_free(dev, 10, kbtab->data, kbtab->data_dma); 185 fail2: usb_free_coherent(dev, 10, kbtab->data, kbtab->data_dma);
186 fail1: input_free_device(input_dev); 186 fail1: input_free_device(input_dev);
187 kfree(kbtab); 187 kfree(kbtab);
188 return error; 188 return error;
@@ -197,7 +197,7 @@ static void kbtab_disconnect(struct usb_interface *intf)
197 usb_kill_urb(kbtab->irq); 197 usb_kill_urb(kbtab->irq);
198 input_unregister_device(kbtab->dev); 198 input_unregister_device(kbtab->dev);
199 usb_free_urb(kbtab->irq); 199 usb_free_urb(kbtab->irq);
200 usb_buffer_free(interface_to_usbdev(intf), 10, kbtab->data, kbtab->data_dma); 200 usb_free_coherent(interface_to_usbdev(intf), 10, kbtab->data, kbtab->data_dma);
201 kfree(kbtab); 201 kfree(kbtab);
202 } 202 }
203} 203}
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index f46502589e4e..191197cd83e3 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -556,8 +556,8 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
556 goto fail1; 556 goto fail1;
557 } 557 }
558 558
559 wacom_wac->data = usb_buffer_alloc(dev, WACOM_PKGLEN_MAX, 559 wacom_wac->data = usb_alloc_coherent(dev, WACOM_PKGLEN_MAX,
560 GFP_KERNEL, &wacom->data_dma); 560 GFP_KERNEL, &wacom->data_dma);
561 if (!wacom_wac->data) { 561 if (!wacom_wac->data) {
562 error = -ENOMEM; 562 error = -ENOMEM;
563 goto fail1; 563 goto fail1;
@@ -633,7 +633,7 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
633 return 0; 633 return 0;
634 634
635 fail3: usb_free_urb(wacom->irq); 635 fail3: usb_free_urb(wacom->irq);
636 fail2: usb_buffer_free(dev, WACOM_PKGLEN_MAX, wacom_wac->data, wacom->data_dma); 636 fail2: usb_free_coherent(dev, WACOM_PKGLEN_MAX, wacom_wac->data, wacom->data_dma);
637 fail1: input_free_device(input_dev); 637 fail1: input_free_device(input_dev);
638 kfree(wacom); 638 kfree(wacom);
639 kfree(wacom_wac); 639 kfree(wacom_wac);
@@ -649,8 +649,8 @@ static void wacom_disconnect(struct usb_interface *intf)
649 usb_kill_urb(wacom->irq); 649 usb_kill_urb(wacom->irq);
650 input_unregister_device(wacom->dev); 650 input_unregister_device(wacom->dev);
651 usb_free_urb(wacom->irq); 651 usb_free_urb(wacom->irq);
652 usb_buffer_free(interface_to_usbdev(intf), WACOM_PKGLEN_MAX, 652 usb_free_coherent(interface_to_usbdev(intf), WACOM_PKGLEN_MAX,
653 wacom->wacom_wac->data, wacom->data_dma); 653 wacom->wacom_wac->data, wacom->data_dma);
654 kfree(wacom->wacom_wac); 654 kfree(wacom->wacom_wac);
655 kfree(wacom); 655 kfree(wacom);
656} 656}
diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c
index 99330bbdbac7..ea41a851ddfd 100644
--- a/drivers/input/touchscreen/usbtouchscreen.c
+++ b/drivers/input/touchscreen/usbtouchscreen.c
@@ -1291,8 +1291,8 @@ static void usbtouch_close(struct input_dev *input)
1291static void usbtouch_free_buffers(struct usb_device *udev, 1291static void usbtouch_free_buffers(struct usb_device *udev,
1292 struct usbtouch_usb *usbtouch) 1292 struct usbtouch_usb *usbtouch)
1293{ 1293{
1294 usb_buffer_free(udev, usbtouch->type->rept_size, 1294 usb_free_coherent(udev, usbtouch->type->rept_size,
1295 usbtouch->data, usbtouch->data_dma); 1295 usbtouch->data, usbtouch->data_dma);
1296 kfree(usbtouch->buffer); 1296 kfree(usbtouch->buffer);
1297} 1297}
1298 1298
@@ -1336,8 +1336,8 @@ static int usbtouch_probe(struct usb_interface *intf,
1336 if (!type->process_pkt) 1336 if (!type->process_pkt)
1337 type->process_pkt = usbtouch_process_pkt; 1337 type->process_pkt = usbtouch_process_pkt;
1338 1338
1339 usbtouch->data = usb_buffer_alloc(udev, type->rept_size, 1339 usbtouch->data = usb_alloc_coherent(udev, type->rept_size,
1340 GFP_KERNEL, &usbtouch->data_dma); 1340 GFP_KERNEL, &usbtouch->data_dma);
1341 if (!usbtouch->data) 1341 if (!usbtouch->data)
1342 goto out_free; 1342 goto out_free;
1343 1343