usb: gadget: uvc: rename functions to avoid conflicts with host uvc

Prepare for separate compilation of uvc function's components.
Some symbols will have to be exported, so rename to avoid
conflicts with functions of the same name in host uvc.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Tested-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
[Rename uvc_video_pump and uvc_queue_head as well]
[Rename forgotten uvc_queue_cancel instance in a comment]
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
diff --git a/drivers/usb/gadget/function/uvc_queue.c b/drivers/usb/gadget/function/uvc_queue.c
index 8590f9f..1e1bc73 100644
--- a/drivers/usb/gadget/function/uvc_queue.c
+++ b/drivers/usb/gadget/function/uvc_queue.c
@@ -28,7 +28,7 @@
 /* ------------------------------------------------------------------------
  * Video buffers queue management.
  *
- * Video queues is initialized by uvc_queue_init(). The function performs
+ * Video queues is initialized by uvcg_queue_init(). The function performs
  * basic initialization of the uvc_video_queue struct and never fails.
  *
  * Video buffers are managed by videobuf2. The driver uses a mutex to protect
@@ -126,8 +126,8 @@
 	.wait_finish = uvc_wait_finish,
 };
 
-static int uvc_queue_init(struct uvc_video_queue *queue,
-			  enum v4l2_buf_type type)
+static int uvcg_queue_init(struct uvc_video_queue *queue,
+			   enum v4l2_buf_type type)
 {
 	int ret;
 
@@ -154,7 +154,7 @@
 /*
  * Free the video buffers.
  */
-static void uvc_free_buffers(struct uvc_video_queue *queue)
+static void uvcg_free_buffers(struct uvc_video_queue *queue)
 {
 	mutex_lock(&queue->mutex);
 	vb2_queue_release(&queue->queue);
@@ -164,8 +164,8 @@
 /*
  * Allocate the video buffers.
  */
-static int uvc_alloc_buffers(struct uvc_video_queue *queue,
-			     struct v4l2_requestbuffers *rb)
+static int uvcg_alloc_buffers(struct uvc_video_queue *queue,
+			      struct v4l2_requestbuffers *rb)
 {
 	int ret;
 
@@ -176,8 +176,8 @@
 	return ret ? ret : rb->count;
 }
 
-static int uvc_query_buffer(struct uvc_video_queue *queue,
-			    struct v4l2_buffer *buf)
+static int uvcg_query_buffer(struct uvc_video_queue *queue,
+			     struct v4l2_buffer *buf)
 {
 	int ret;
 
@@ -188,8 +188,8 @@
 	return ret;
 }
 
-static int uvc_queue_buffer(struct uvc_video_queue *queue,
-			    struct v4l2_buffer *buf)
+static int uvcg_queue_buffer(struct uvc_video_queue *queue,
+			     struct v4l2_buffer *buf)
 {
 	unsigned long flags;
 	int ret;
@@ -213,8 +213,8 @@
  * Dequeue a video buffer. If nonblocking is false, block until a buffer is
  * available.
  */
-static int uvc_dequeue_buffer(struct uvc_video_queue *queue,
-			      struct v4l2_buffer *buf, int nonblocking)
+static int uvcg_dequeue_buffer(struct uvc_video_queue *queue,
+			       struct v4l2_buffer *buf, int nonblocking)
 {
 	int ret;
 
@@ -231,8 +231,8 @@
  * This function implements video queue polling and is intended to be used by
  * the device poll handler.
  */
-static unsigned int uvc_queue_poll(struct uvc_video_queue *queue,
-				   struct file *file, poll_table *wait)
+static unsigned int uvcg_queue_poll(struct uvc_video_queue *queue,
+				    struct file *file, poll_table *wait)
 {
 	unsigned int ret;
 
@@ -243,8 +243,8 @@
 	return ret;
 }
 
-static int uvc_queue_mmap(struct uvc_video_queue *queue,
-			  struct vm_area_struct *vma)
+static int uvcg_queue_mmap(struct uvc_video_queue *queue,
+			   struct vm_area_struct *vma)
 {
 	int ret;
 
@@ -261,8 +261,9 @@
  *
  * NO-MMU arch need this function to make mmap() work correctly.
  */
-static unsigned long uvc_queue_get_unmapped_area(struct uvc_video_queue *queue,
-		unsigned long pgoff)
+static unsigned long uvcg_queue_get_unmapped_area(
+				struct uvc_video_queue *queue,
+				unsigned long pgoff)
 {
 	unsigned long ret;
 
@@ -285,7 +286,7 @@
  * This function acquires the irq spinlock and can be called from interrupt
  * context.
  */
-static void uvc_queue_cancel(struct uvc_video_queue *queue, int disconnect)
+static void uvcg_queue_cancel(struct uvc_video_queue *queue, int disconnect)
 {
 	struct uvc_buffer *buf;
 	unsigned long flags;
@@ -324,9 +325,9 @@
  * the main queue.
  *
  * This function can't be called from interrupt context. Use
- * uvc_queue_cancel() instead.
+ * uvcg_queue_cancel() instead.
  */
-static int uvc_queue_enable(struct uvc_video_queue *queue, int enable)
+static int uvcg_queue_enable(struct uvc_video_queue *queue, int enable)
 {
 	unsigned long flags;
 	int ret = 0;
@@ -363,8 +364,8 @@
 }
 
 /* called with &queue_irqlock held.. */
-static struct uvc_buffer *uvc_queue_next_buffer(struct uvc_video_queue *queue,
-						struct uvc_buffer *buf)
+static struct uvc_buffer *uvcg_queue_next_buffer(struct uvc_video_queue *queue,
+						 struct uvc_buffer *buf)
 {
 	struct uvc_buffer *nextbuf;
 
@@ -392,7 +393,7 @@
 	return nextbuf;
 }
 
-static struct uvc_buffer *uvc_queue_head(struct uvc_video_queue *queue)
+static struct uvc_buffer *uvcg_queue_head(struct uvc_video_queue *queue)
 {
 	struct uvc_buffer *buf = NULL;