aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrzej Hajda <a.hajda@samsung.com>2013-05-28 03:26:15 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-06-03 15:56:37 -0300
commit69c9fe6f4afae54cad12635bdb8e90e7d832e240 (patch)
tree2bc85d9b81bd7341aac868234de72cbb8c8abc97
parentac5f867fbfbd1ff5a43e796ed470deff42b630d2 (diff)
[media] s5p-mfc: v4l2 controls setup routine moved to initialization code
Callback .start_streaming is called once for every queue, so v4l2_ctrl_handler_setup was called twice during stream start. Moving v4l2_ctrl_handler_setup to context initialization reduces numbers of calls and seems to be more consistent with API. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/platform/s5p-mfc/s5p_mfc_enc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
index 5e019aa6113..5d97a984fc0 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
@@ -1789,7 +1789,6 @@ static int s5p_mfc_start_streaming(struct vb2_queue *q, unsigned int count)
}
}
- v4l2_ctrl_handler_setup(&ctx->ctrl_handler);
/* If context is ready then dev = work->data;schedule it to run */
if (s5p_mfc_ctx_ready(ctx))
set_work_bit_irqsave(ctx);
@@ -1950,6 +1949,7 @@ int s5p_mfc_enc_ctrls_setup(struct s5p_mfc_ctx *ctx)
if (controls[i].is_volatile && ctx->ctrls[i])
ctx->ctrls[i]->flags |= V4L2_CTRL_FLAG_VOLATILE;
}
+ v4l2_ctrl_handler_setup(&ctx->ctrl_handler);
return 0;
}