mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]> Cc: Alan Stern <[email protected]> Cc: Pedro Ribeiro <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
48679c6d77
commit
997ea58eb9
51 changed files with 286 additions and 291 deletions
|
|
@ -600,8 +600,8 @@ static inline void usb_pcwd_delete(struct usb_pcwd_private *usb_pcwd)
|
|||
{
|
||||
usb_free_urb(usb_pcwd->intr_urb);
|
||||
if (usb_pcwd->intr_buffer != NULL)
|
||||
usb_buffer_free(usb_pcwd->udev, usb_pcwd->intr_size,
|
||||
usb_pcwd->intr_buffer, usb_pcwd->intr_dma);
|
||||
usb_free_coherent(usb_pcwd->udev, usb_pcwd->intr_size,
|
||||
usb_pcwd->intr_buffer, usb_pcwd->intr_dma);
|
||||
kfree(usb_pcwd);
|
||||
}
|
||||
|
||||
|
|
@ -671,7 +671,7 @@ static int usb_pcwd_probe(struct usb_interface *interface,
|
|||
le16_to_cpu(endpoint->wMaxPacketSize) : 8);
|
||||
|
||||
/* set up the memory buffer's */
|
||||
usb_pcwd->intr_buffer = usb_buffer_alloc(udev, usb_pcwd->intr_size,
|
||||
usb_pcwd->intr_buffer = usb_alloc_coherent(udev, usb_pcwd->intr_size,
|
||||
GFP_ATOMIC, &usb_pcwd->intr_dma);
|
||||
if (!usb_pcwd->intr_buffer) {
|
||||
printk(KERN_ERR PFX "Out of memory\n");
|
||||
|
|
|
|||
Loading…
Reference in a new issue