[media] v4l: vsp1: Move entity route setup function to vsp1_entity.c
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Sun, 2 Aug 2015 21:58:31 +0000 (18:58 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 19 Feb 2016 11:14:08 +0000 (09:14 -0200)
The function will be used by the DU code, move it out of vsp1_video.c.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/platform/vsp1/vsp1_entity.c
drivers/media/platform/vsp1/vsp1_entity.h
drivers/media/platform/vsp1/vsp1_video.c

index 46832242a67210429da2a7f4b7634e65ed005fae..479029fd4e9039231b0accb3550adda1f15aa863 100644 (file)
@@ -58,6 +58,18 @@ int vsp1_entity_set_streaming(struct vsp1_entity *entity, bool streaming)
        return ret;
 }
 
+void vsp1_entity_route_setup(struct vsp1_entity *source)
+{
+       struct vsp1_entity *sink;
+
+       if (source->route->reg == 0)
+               return;
+
+       sink = container_of(source->sink, struct vsp1_entity, subdev.entity);
+       vsp1_write(source->vsp1, source->route->reg,
+                  sink->route->inputs[source->sink_pad]);
+}
+
 /* -----------------------------------------------------------------------------
  * V4L2 Subdevice Operations
  */
index 9c95507ec762c82d4cef2d7a51a444fdf2298f18..9606d0d2126303f1bea8ae6b7b4f30b6894e4bab 100644 (file)
@@ -96,4 +96,6 @@ void vsp1_entity_init_formats(struct v4l2_subdev *subdev,
 bool vsp1_entity_is_streaming(struct vsp1_entity *entity);
 int vsp1_entity_set_streaming(struct vsp1_entity *entity, bool streaming);
 
+void vsp1_entity_route_setup(struct vsp1_entity *source);
+
 #endif /* __VSP1_ENTITY_H__ */
index b1bb63d2a36532877c68ed977a24ede11505696b..7cf73d4f0963691ac86fcdbb1fc90da5f59c2132 100644 (file)
@@ -674,18 +674,6 @@ static void vsp1_video_buffer_queue(struct vb2_buffer *vb)
        spin_unlock_irqrestore(&pipe->irqlock, flags);
 }
 
-static void vsp1_entity_route_setup(struct vsp1_entity *source)
-{
-       struct vsp1_entity *sink;
-
-       if (source->route->reg == 0)
-               return;
-
-       sink = container_of(source->sink, struct vsp1_entity, subdev.entity);
-       vsp1_write(source->vsp1, source->route->reg,
-                  sink->route->inputs[source->sink_pad]);
-}
-
 static int vsp1_video_start_streaming(struct vb2_queue *vq, unsigned int count)
 {
        struct vsp1_video *video = vb2_get_drv_priv(vq);