aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc/usblcd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/misc/usblcd.c')
-rw-r--r--drivers/usb/misc/usblcd.c8
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:
268error_unanchor: 268error_unanchor:
269 usb_unanchor_urb(urb); 269 usb_unanchor_urb(urb);
270error: 270error:
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);
273err_no_buf: 273err_no_buf:
274 up(&dev->limit_sem); 274 up(&dev->limit_sem);