aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/bcm5974.c
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/mouse/bcm5974.c
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/mouse/bcm5974.c')
-rw-r--r--drivers/input/mouse/bcm5974.c24
1 files changed, 12 insertions, 12 deletions
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);