aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tlg2300/pd-video.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/media/video/tlg2300/pd-video.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/media/video/tlg2300/pd-video.c')
-rw-r--r--drivers/media/video/tlg2300/pd-video.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/media/video/tlg2300/pd-video.c b/drivers/media/video/tlg2300/pd-video.c
index cf8f18c007e6..7bc29065e1ad 100644
--- a/drivers/media/video/tlg2300/pd-video.c
+++ b/drivers/media/video/tlg2300/pd-video.c
@@ -476,10 +476,10 @@ static int prepare_iso_urb(struct video_data *video)
476 goto out; 476 goto out;
477 477
478 video->urb_array[i] = urb; 478 video->urb_array[i] = urb;
479 mem = usb_buffer_alloc(udev, 479 mem = usb_alloc_coherent(udev,
480 ISO_PKT_SIZE * PK_PER_URB, 480 ISO_PKT_SIZE * PK_PER_URB,
481 GFP_KERNEL, 481 GFP_KERNEL,
482 &urb->transfer_dma); 482 &urb->transfer_dma);
483 483
484 urb->complete = urb_complete_iso; /* handler */ 484 urb->complete = urb_complete_iso; /* handler */
485 urb->dev = udev; 485 urb->dev = udev;
@@ -519,8 +519,8 @@ int alloc_bulk_urbs_generic(struct urb **urb_array, int num,
519 if (urb == NULL) 519 if (urb == NULL)
520 return i; 520 return i;
521 521
522 mem = usb_buffer_alloc(udev, buf_size, gfp_flags, 522 mem = usb_alloc_coherent(udev, buf_size, gfp_flags,
523 &urb->transfer_dma); 523 &urb->transfer_dma);
524 if (mem == NULL) 524 if (mem == NULL)
525 return i; 525 return i;
526 526
@@ -540,7 +540,7 @@ void free_all_urb_generic(struct urb **urb_array, int num)
540 for (i = 0; i < num; i++) { 540 for (i = 0; i < num; i++) {
541 urb = urb_array[i]; 541 urb = urb_array[i];
542 if (urb) { 542 if (urb) {
543 usb_buffer_free(urb->dev, 543 usb_free_coherent(urb->dev,
544 urb->transfer_buffer_length, 544 urb->transfer_buffer_length,
545 urb->transfer_buffer, 545 urb->transfer_buffer,
546 urb->transfer_dma); 546 urb->transfer_dma);