diff options
author | Daniel Mack <daniel@caiaq.de> | 2010-04-12 07:17:25 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-20 16:21:38 -0400 |
commit | 997ea58eb92f9970b8af7aae48800d0ef43b9423 (patch) | |
tree | 65e021973e5a48ad7290d5be1f441940566468ad /drivers/net/wireless | |
parent | 48679c6d772b1459a2945729e3a1256ac78fcabf (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')
-rw-r--r-- | drivers/net/wireless/ath/ar9170/usb.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_usb.c | 10 |
2 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/wireless/ath/ar9170/usb.c b/drivers/net/wireless/ath/ar9170/usb.c index e1c2fcaa8bed..a1f5444f7ccd 100644 --- a/drivers/net/wireless/ath/ar9170/usb.c +++ b/drivers/net/wireless/ath/ar9170/usb.c | |||
@@ -202,7 +202,7 @@ resubmit: | |||
202 | return; | 202 | return; |
203 | 203 | ||
204 | free: | 204 | free: |
205 | usb_buffer_free(aru->udev, 64, urb->transfer_buffer, urb->transfer_dma); | 205 | usb_free_coherent(aru->udev, 64, urb->transfer_buffer, urb->transfer_dma); |
206 | } | 206 | } |
207 | 207 | ||
208 | static void ar9170_usb_rx_completed(struct urb *urb) | 208 | static void ar9170_usb_rx_completed(struct urb *urb) |
@@ -283,7 +283,7 @@ static int ar9170_usb_alloc_rx_irq_urb(struct ar9170_usb *aru) | |||
283 | if (!urb) | 283 | if (!urb) |
284 | goto out; | 284 | goto out; |
285 | 285 | ||
286 | ibuf = usb_buffer_alloc(aru->udev, 64, GFP_KERNEL, &urb->transfer_dma); | 286 | ibuf = usb_alloc_coherent(aru->udev, 64, GFP_KERNEL, &urb->transfer_dma); |
287 | if (!ibuf) | 287 | if (!ibuf) |
288 | goto out; | 288 | goto out; |
289 | 289 | ||
@@ -296,8 +296,8 @@ static int ar9170_usb_alloc_rx_irq_urb(struct ar9170_usb *aru) | |||
296 | err = usb_submit_urb(urb, GFP_KERNEL); | 296 | err = usb_submit_urb(urb, GFP_KERNEL); |
297 | if (err) { | 297 | if (err) { |
298 | usb_unanchor_urb(urb); | 298 | usb_unanchor_urb(urb); |
299 | usb_buffer_free(aru->udev, 64, urb->transfer_buffer, | 299 | usb_free_coherent(aru->udev, 64, urb->transfer_buffer, |
300 | urb->transfer_dma); | 300 | urb->transfer_dma); |
301 | } | 301 | } |
302 | 302 | ||
303 | out: | 303 | out: |
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 | ||