diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2015-08-02 16:32:13 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-02-19 06:07:07 -0500 |
commit | f294c2f70e5951e0c2033b9dd50ba4d19a5405f1 (patch) | |
tree | 06c998f9d7fadc6e2907edb6f767b1f4e090a4e9 /drivers/media/platform/vsp1/vsp1_pipe.c | |
parent | 945f127677a00cee5fb0c9118ab3c21fe4f8b245 (diff) |
[media] v4l: vsp1: Extract pipeline initialization code into a function
The code will be reused outside of vsp1_video.c.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform/vsp1/vsp1_pipe.c')
-rw-r--r-- | drivers/media/platform/vsp1/vsp1_pipe.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/media/platform/vsp1/vsp1_pipe.c b/drivers/media/platform/vsp1/vsp1_pipe.c index cdc670b88fcc..584a9d408144 100644 --- a/drivers/media/platform/vsp1/vsp1_pipe.c +++ b/drivers/media/platform/vsp1/vsp1_pipe.c | |||
@@ -49,6 +49,16 @@ void vsp1_pipeline_reset(struct vsp1_pipeline *pipe) | |||
49 | pipe->uds = NULL; | 49 | pipe->uds = NULL; |
50 | } | 50 | } |
51 | 51 | ||
52 | void vsp1_pipeline_init(struct vsp1_pipeline *pipe) | ||
53 | { | ||
54 | mutex_init(&pipe->lock); | ||
55 | spin_lock_init(&pipe->irqlock); | ||
56 | init_waitqueue_head(&pipe->wq); | ||
57 | |||
58 | INIT_LIST_HEAD(&pipe->entities); | ||
59 | pipe->state = VSP1_PIPELINE_STOPPED; | ||
60 | } | ||
61 | |||
52 | void vsp1_pipeline_run(struct vsp1_pipeline *pipe) | 62 | void vsp1_pipeline_run(struct vsp1_pipeline *pipe) |
53 | { | 63 | { |
54 | struct vsp1_device *vsp1 = pipe->output->entity.vsp1; | 64 | struct vsp1_device *vsp1 = pipe->output->entity.vsp1; |