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/usb/misc/usblcd.c | |
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/usb/misc/usblcd.c')
-rw-r--r-- | drivers/usb/misc/usblcd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/misc/usblcd.c b/drivers/usb/misc/usblcd.c index 90aede90553e..7828c764b323 100644 --- a/drivers/usb/misc/usblcd.c +++ b/drivers/usb/misc/usblcd.c | |||
@@ -205,8 +205,8 @@ static void lcd_write_bulk_callback(struct urb *urb) | |||
205 | } | 205 | } |
206 | 206 | ||
207 | /* free up our allocated buffer */ | 207 | /* free up our allocated buffer */ |
208 | usb_buffer_free(urb->dev, urb->transfer_buffer_length, | 208 | usb_free_coherent(urb->dev, urb->transfer_buffer_length, |
209 | urb->transfer_buffer, urb->transfer_dma); | 209 | urb->transfer_buffer, urb->transfer_dma); |
210 | up(&dev->limit_sem); | 210 | up(&dev->limit_sem); |
211 | } | 211 | } |
212 | 212 | ||
@@ -234,7 +234,7 @@ static ssize_t lcd_write(struct file *file, const char __user * user_buffer, siz | |||
234 | goto err_no_buf; | 234 | goto err_no_buf; |
235 | } | 235 | } |
236 | 236 | ||
237 | buf = usb_buffer_alloc(dev->udev, count, GFP_KERNEL, &urb->transfer_dma); | 237 | buf = usb_alloc_coherent(dev->udev, count, GFP_KERNEL, &urb->transfer_dma); |
238 | if (!buf) { | 238 | if (!buf) { |
239 | retval = -ENOMEM; | 239 | retval = -ENOMEM; |
240 | goto error; | 240 | goto error; |
@@ -268,7 +268,7 @@ exit: | |||
268 | error_unanchor: | 268 | error_unanchor: |
269 | usb_unanchor_urb(urb); | 269 | usb_unanchor_urb(urb); |
270 | error: | 270 | error: |
271 | usb_buffer_free(dev->udev, count, buf, urb->transfer_dma); | 271 | usb_free_coherent(dev->udev, count, buf, urb->transfer_dma); |
272 | usb_free_urb(urb); | 272 | usb_free_urb(urb); |
273 | err_no_buf: | 273 | err_no_buf: |
274 | up(&dev->limit_sem); | 274 | up(&dev->limit_sem); |