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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
48679c6d77
commit
997ea58eb9
@@ -259,7 +259,7 @@ static int appledisplay_probe(struct usb_interface *iface,
|
||||
}
|
||||
|
||||
/* Allocate buffer for interrupt data */
|
||||
pdata->urbdata = usb_buffer_alloc(pdata->udev, ACD_URB_BUFFER_LEN,
|
||||
pdata->urbdata = usb_alloc_coherent(pdata->udev, ACD_URB_BUFFER_LEN,
|
||||
GFP_KERNEL, &pdata->urb->transfer_dma);
|
||||
if (!pdata->urbdata) {
|
||||
retval = -ENOMEM;
|
||||
@@ -316,7 +316,7 @@ error:
|
||||
if (pdata->urb) {
|
||||
usb_kill_urb(pdata->urb);
|
||||
if (pdata->urbdata)
|
||||
usb_buffer_free(pdata->udev, ACD_URB_BUFFER_LEN,
|
||||
usb_free_coherent(pdata->udev, ACD_URB_BUFFER_LEN,
|
||||
pdata->urbdata, pdata->urb->transfer_dma);
|
||||
usb_free_urb(pdata->urb);
|
||||
}
|
||||
@@ -337,7 +337,7 @@ static void appledisplay_disconnect(struct usb_interface *iface)
|
||||
usb_kill_urb(pdata->urb);
|
||||
cancel_delayed_work(&pdata->work);
|
||||
backlight_device_unregister(pdata->bd);
|
||||
usb_buffer_free(pdata->udev, ACD_URB_BUFFER_LEN,
|
||||
usb_free_coherent(pdata->udev, ACD_URB_BUFFER_LEN,
|
||||
pdata->urbdata, pdata->urb->transfer_dma);
|
||||
usb_free_urb(pdata->urb);
|
||||
kfree(pdata->msgdata);
|
||||
|
Reference in New Issue
Block a user