aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc/appledisplay.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/usb/misc/appledisplay.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/usb/misc/appledisplay.c')
-rw-r--r--drivers/usb/misc/appledisplay.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/misc/appledisplay.c b/drivers/usb/misc/appledisplay.c
index 094f91cbc578..1fa6ce3e4a23 100644
--- a/drivers/usb/misc/appledisplay.c
+++ b/drivers/usb/misc/appledisplay.c
@@ -259,7 +259,7 @@ static int appledisplay_probe(struct usb_interface *iface,
259 } 259 }
260 260
261 /* Allocate buffer for interrupt data */ 261 /* Allocate buffer for interrupt data */
262 pdata->urbdata = usb_buffer_alloc(pdata->udev, ACD_URB_BUFFER_LEN, 262 pdata->urbdata = usb_alloc_coherent(pdata->udev, ACD_URB_BUFFER_LEN,
263 GFP_KERNEL, &pdata->urb->transfer_dma); 263 GFP_KERNEL, &pdata->urb->transfer_dma);
264 if (!pdata->urbdata) { 264 if (!pdata->urbdata) {
265 retval = -ENOMEM; 265 retval = -ENOMEM;
@@ -316,7 +316,7 @@ error:
316 if (pdata->urb) { 316 if (pdata->urb) {
317 usb_kill_urb(pdata->urb); 317 usb_kill_urb(pdata->urb);
318 if (pdata->urbdata) 318 if (pdata->urbdata)
319 usb_buffer_free(pdata->udev, ACD_URB_BUFFER_LEN, 319 usb_free_coherent(pdata->udev, ACD_URB_BUFFER_LEN,
320 pdata->urbdata, pdata->urb->transfer_dma); 320 pdata->urbdata, pdata->urb->transfer_dma);
321 usb_free_urb(pdata->urb); 321 usb_free_urb(pdata->urb);
322 } 322 }
@@ -337,7 +337,7 @@ static void appledisplay_disconnect(struct usb_interface *iface)
337 usb_kill_urb(pdata->urb); 337 usb_kill_urb(pdata->urb);
338 cancel_delayed_work(&pdata->work); 338 cancel_delayed_work(&pdata->work);
339 backlight_device_unregister(pdata->bd); 339 backlight_device_unregister(pdata->bd);
340 usb_buffer_free(pdata->udev, ACD_URB_BUFFER_LEN, 340 usb_free_coherent(pdata->udev, ACD_URB_BUFFER_LEN,
341 pdata->urbdata, pdata->urb->transfer_dma); 341 pdata->urbdata, pdata->urb->transfer_dma);
342 usb_free_urb(pdata->urb); 342 usb_free_urb(pdata->urb);
343 kfree(pdata->msgdata); 343 kfree(pdata->msgdata);