diff mbox series

[PATCHv2,10/12] vim2m: use v4l2_m2m_request_validate()

Message ID 20200818143719.102128-11-hverkuil-cisco@xs4all.nl
State New
Headers show
Series Add support for read-only requests | expand

Commit Message

Hans Verkuil Aug. 18, 2020, 2:37 p.m. UTC
Use v4l2_m2m_request_validate() instead of vb2_request_validate.
The v4l2_m2m_request_validate() ensures that a control handler
request object is added if it was missing.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
---
 drivers/media/test-drivers/vim2m.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/media/test-drivers/vim2m.c b/drivers/media/test-drivers/vim2m.c
index a776bb8e0e09..b73de65c0006 100644
--- a/drivers/media/test-drivers/vim2m.c
+++ b/drivers/media/test-drivers/vim2m.c
@@ -1230,6 +1230,7 @@  static int vim2m_open(struct file *file)
 		goto open_unlock;
 	}
 
+	ctx->fh.m2m_ctx->req_ctrl_handler = hdl;
 	v4l2_fh_add(&ctx->fh);
 	atomic_inc(&dev->num_inst);
 
@@ -1299,7 +1300,7 @@  static const struct v4l2_m2m_ops m2m_ops = {
 };
 
 static const struct media_device_ops m2m_media_ops = {
-	.req_validate = vb2_request_validate,
+	.req_validate = v4l2_m2m_request_validate,
 	.req_queue = v4l2_m2m_request_queue,
 };