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/media/video/uvc/uvc_video.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/media/video/uvc/uvc_video.c')
-rw-r--r-- | drivers/media/video/uvc/uvc_video.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/video/uvc/uvc_video.c b/drivers/media/video/uvc/uvc_video.c index 821a9969b7bf..53f3ef4635eb 100644 --- a/drivers/media/video/uvc/uvc_video.c +++ b/drivers/media/video/uvc/uvc_video.c | |||
@@ -739,7 +739,7 @@ static void uvc_free_urb_buffers(struct uvc_streaming *stream) | |||
739 | 739 | ||
740 | for (i = 0; i < UVC_URBS; ++i) { | 740 | for (i = 0; i < UVC_URBS; ++i) { |
741 | if (stream->urb_buffer[i]) { | 741 | if (stream->urb_buffer[i]) { |
742 | usb_buffer_free(stream->dev->udev, stream->urb_size, | 742 | usb_free_coherent(stream->dev->udev, stream->urb_size, |
743 | stream->urb_buffer[i], stream->urb_dma[i]); | 743 | stream->urb_buffer[i], stream->urb_dma[i]); |
744 | stream->urb_buffer[i] = NULL; | 744 | stream->urb_buffer[i] = NULL; |
745 | } | 745 | } |
@@ -780,7 +780,7 @@ static int uvc_alloc_urb_buffers(struct uvc_streaming *stream, | |||
780 | for (; npackets > 1; npackets /= 2) { | 780 | for (; npackets > 1; npackets /= 2) { |
781 | for (i = 0; i < UVC_URBS; ++i) { | 781 | for (i = 0; i < UVC_URBS; ++i) { |
782 | stream->urb_size = psize * npackets; | 782 | stream->urb_size = psize * npackets; |
783 | stream->urb_buffer[i] = usb_buffer_alloc( | 783 | stream->urb_buffer[i] = usb_alloc_coherent( |
784 | stream->dev->udev, stream->urb_size, | 784 | stream->dev->udev, stream->urb_size, |
785 | gfp_flags | __GFP_NOWARN, &stream->urb_dma[i]); | 785 | gfp_flags | __GFP_NOWARN, &stream->urb_dma[i]); |
786 | if (!stream->urb_buffer[i]) { | 786 | if (!stream->urb_buffer[i]) { |