aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/zd1211rw/zd_usb.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/net/wireless/zd1211rw/zd_usb.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/net/wireless/zd1211rw/zd_usb.c')
-rw-r--r--drivers/net/wireless/zd1211rw/zd_usb.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c
index d91ad1a612af..c257940b71b6 100644
--- a/drivers/net/wireless/zd1211rw/zd_usb.c
+++ b/drivers/net/wireless/zd1211rw/zd_usb.c
@@ -664,15 +664,15 @@ static struct urb *alloc_rx_urb(struct zd_usb *usb)
664 urb = usb_alloc_urb(0, GFP_KERNEL); 664 urb = usb_alloc_urb(0, GFP_KERNEL);
665 if (!urb) 665 if (!urb)
666 return NULL; 666 return NULL;
667 buffer = usb_buffer_alloc(udev, USB_MAX_RX_SIZE, GFP_KERNEL, 667 buffer = usb_alloc_coherent(udev, USB_MAX_RX_SIZE, GFP_KERNEL,
668 &urb->transfer_dma); 668 &urb->transfer_dma);
669 if (!buffer) { 669 if (!buffer) {
670 usb_free_urb(urb); 670 usb_free_urb(urb);
671 return NULL; 671 return NULL;
672 } 672 }
673 673
674 usb_fill_bulk_urb(urb, udev, usb_rcvbulkpipe(udev, EP_DATA_IN), 674 usb_fill_bulk_urb(urb, udev, usb_rcvbulkpipe(udev, EP_DATA_IN),
675 buffer, USB_MAX_RX_SIZE, 675 buffer, USB_MAX_RX_SIZE,
676 rx_urb_complete, usb); 676 rx_urb_complete, usb);
677 urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; 677 urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
678 678
@@ -683,8 +683,8 @@ static void free_rx_urb(struct urb *urb)
683{ 683{
684 if (!urb) 684 if (!urb)
685 return; 685 return;
686 usb_buffer_free(urb->dev, urb->transfer_buffer_length, 686 usb_free_coherent(urb->dev, urb->transfer_buffer_length,
687 urb->transfer_buffer, urb->transfer_dma); 687 urb->transfer_buffer, urb->transfer_dma);
688 usb_free_urb(urb); 688 usb_free_urb(urb);
689} 689}
690 690