summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/vivid/vivid-ctrls.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2015-10-29 02:59:37 -0200
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-11-17 14:34:23 -0200
commitf6de9f608504849f3437abe60eeb43932ec5455e (patch)
treeb5a6e7bc6c5d27048eee5460f4d401ab84d381a1 /drivers/media/platform/vivid/vivid-ctrls.c
parentba463988a00520d0019cfc70f42ecfe122e9fefd (diff)
downloadblackbird-op-linux-f6de9f608504849f3437abe60eeb43932ec5455e.tar.gz
blackbird-op-linux-f6de9f608504849f3437abe60eeb43932ec5455e.zip
[media] vivid: fix compliance error
If vivid is loaded with the no_error_inj=1 option, then v4l2-compliance will fail for the video and vbi output nodes because the vivid control class has no controls. Don't add the control class for video and vbi output if no_error_inj is true. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform/vivid/vivid-ctrls.c')
-rw-r--r--drivers/media/platform/vivid/vivid-ctrls.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/platform/vivid/vivid-ctrls.c b/drivers/media/platform/vivid/vivid-ctrls.c
index f41ac0b01fec..ae88afc0c0ce 100644
--- a/drivers/media/platform/vivid/vivid-ctrls.c
+++ b/drivers/media/platform/vivid/vivid-ctrls.c
@@ -1340,11 +1340,13 @@ int vivid_create_controls(struct vivid_dev *dev, bool show_ccs_cap,
v4l2_ctrl_handler_init(hdl_vid_cap, 55);
v4l2_ctrl_new_custom(hdl_vid_cap, &vivid_ctrl_class, NULL);
v4l2_ctrl_handler_init(hdl_vid_out, 26);
- v4l2_ctrl_new_custom(hdl_vid_out, &vivid_ctrl_class, NULL);
+ if (!no_error_inj)
+ v4l2_ctrl_new_custom(hdl_vid_out, &vivid_ctrl_class, NULL);
v4l2_ctrl_handler_init(hdl_vbi_cap, 21);
v4l2_ctrl_new_custom(hdl_vbi_cap, &vivid_ctrl_class, NULL);
v4l2_ctrl_handler_init(hdl_vbi_out, 19);
- v4l2_ctrl_new_custom(hdl_vbi_out, &vivid_ctrl_class, NULL);
+ if (!no_error_inj)
+ v4l2_ctrl_new_custom(hdl_vbi_out, &vivid_ctrl_class, NULL);
v4l2_ctrl_handler_init(hdl_radio_rx, 17);
v4l2_ctrl_new_custom(hdl_radio_rx, &vivid_ctrl_class, NULL);
v4l2_ctrl_handler_init(hdl_radio_tx, 17);
OpenPOWER on IntegriCloud