From 997ea58eb92f9970b8af7aae48800d0ef43b9423 Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Mon, 12 Apr 2010 13:17:25 +0200 Subject: 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 Cc: Alan Stern Cc: Pedro Ribeiro Signed-off-by: Greg Kroah-Hartman --- drivers/usb/usb-skeleton.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'drivers/usb/usb-skeleton.c') diff --git a/drivers/usb/usb-skeleton.c b/drivers/usb/usb-skeleton.c index 61522787f39c..d110588b56f1 100644 --- a/drivers/usb/usb-skeleton.c +++ b/drivers/usb/usb-skeleton.c @@ -387,8 +387,8 @@ static void skel_write_bulk_callback(struct urb *urb) } /* free up our allocated buffer */ - usb_buffer_free(urb->dev, urb->transfer_buffer_length, - urb->transfer_buffer, urb->transfer_dma); + usb_free_coherent(urb->dev, urb->transfer_buffer_length, + urb->transfer_buffer, urb->transfer_dma); up(&dev->limit_sem); } @@ -442,8 +442,8 @@ static ssize_t skel_write(struct file *file, const char *user_buffer, goto error; } - buf = usb_buffer_alloc(dev->udev, writesize, GFP_KERNEL, - &urb->transfer_dma); + buf = usb_alloc_coherent(dev->udev, writesize, GFP_KERNEL, + &urb->transfer_dma); if (!buf) { retval = -ENOMEM; goto error; @@ -491,7 +491,7 @@ error_unanchor: usb_unanchor_urb(urb); error: if (urb) { - usb_buffer_free(dev->udev, writesize, buf, urb->transfer_dma); + usb_free_coherent(dev->udev, writesize, buf, urb->transfer_dma); usb_free_urb(urb); } up(&dev->limit_sem); -- cgit v1.2.3