aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/usb-skeleton.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/usb-skeleton.c')
-rw-r--r--drivers/usb/usb-skeleton.c10
1 files changed, 5 insertions, 5 deletions
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)
387 } 387 }
388 388
389 /* free up our allocated buffer */ 389 /* free up our allocated buffer */
390 usb_buffer_free(urb->dev, urb->transfer_buffer_length, 390 usb_free_coherent(urb->dev, urb->transfer_buffer_length,
391 urb->transfer_buffer, urb->transfer_dma); 391 urb->transfer_buffer, urb->transfer_dma);
392 up(&dev->limit_sem); 392 up(&dev->limit_sem);
393} 393}
394 394
@@ -442,8 +442,8 @@ static ssize_t skel_write(struct file *file, const char *user_buffer,
442 goto error; 442 goto error;
443 } 443 }
444 444
445 buf = usb_buffer_alloc(dev->udev, writesize, GFP_KERNEL, 445 buf = usb_alloc_coherent(dev->udev, writesize, GFP_KERNEL,
446 &urb->transfer_dma); 446 &urb->transfer_dma);
447 if (!buf) { 447 if (!buf) {
448 retval = -ENOMEM; 448 retval = -ENOMEM;
449 goto error; 449 goto error;
@@ -491,7 +491,7 @@ error_unanchor:
491 usb_unanchor_urb(urb); 491 usb_unanchor_urb(urb);
492error: 492error:
493 if (urb) { 493 if (urb) {
494 usb_buffer_free(dev->udev, writesize, buf, urb->transfer_dma); 494 usb_free_coherent(dev->udev, writesize, buf, urb->transfer_dma);
495 usb_free_urb(urb); 495 usb_free_urb(urb);
496 } 496 }
497 up(&dev->limit_sem); 497 up(&dev->limit_sem);