Commit 7c869651 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[media] s3c-camif: Remove use of deprecated V4L2_CTRL_FLAG_DISABLED

I came across this while checking the kernel use of V4L2_CTRL_FLAG_DISABLED.

This flag should not be used with the control framework. Instead, just don't
add the control at all.
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Acked-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent 3857fcde
...@@ -1592,6 +1592,7 @@ int s3c_camif_create_subdev(struct camif_dev *camif) ...@@ -1592,6 +1592,7 @@ int s3c_camif_create_subdev(struct camif_dev *camif)
ARRAY_SIZE(s3c_camif_test_pattern_menu) - 1, 0, 0, ARRAY_SIZE(s3c_camif_test_pattern_menu) - 1, 0, 0,
s3c_camif_test_pattern_menu); s3c_camif_test_pattern_menu);
if (camif->variant->has_img_effect) {
camif->ctrl_colorfx = v4l2_ctrl_new_std_menu(handler, camif->ctrl_colorfx = v4l2_ctrl_new_std_menu(handler,
&s3c_camif_subdev_ctrl_ops, &s3c_camif_subdev_ctrl_ops,
V4L2_CID_COLORFX, V4L2_COLORFX_SET_CBCR, V4L2_CID_COLORFX, V4L2_COLORFX_SET_CBCR,
...@@ -1600,18 +1601,18 @@ int s3c_camif_create_subdev(struct camif_dev *camif) ...@@ -1600,18 +1601,18 @@ int s3c_camif_create_subdev(struct camif_dev *camif)
camif->ctrl_colorfx_cbcr = v4l2_ctrl_new_std(handler, camif->ctrl_colorfx_cbcr = v4l2_ctrl_new_std(handler,
&s3c_camif_subdev_ctrl_ops, &s3c_camif_subdev_ctrl_ops,
V4L2_CID_COLORFX_CBCR, 0, 0xffff, 1, 0); V4L2_CID_COLORFX_CBCR, 0, 0xffff, 1, 0);
}
if (handler->error) { if (handler->error) {
v4l2_ctrl_handler_free(handler); v4l2_ctrl_handler_free(handler);
media_entity_cleanup(&sd->entity); media_entity_cleanup(&sd->entity);
return handler->error; return handler->error;
} }
if (camif->variant->has_img_effect)
v4l2_ctrl_auto_cluster(2, &camif->ctrl_colorfx, v4l2_ctrl_auto_cluster(2, &camif->ctrl_colorfx,
V4L2_COLORFX_SET_CBCR, false); V4L2_COLORFX_SET_CBCR, false);
if (!camif->variant->has_img_effect) {
camif->ctrl_colorfx->flags |= V4L2_CTRL_FLAG_DISABLED;
camif->ctrl_colorfx_cbcr->flags |= V4L2_CTRL_FLAG_DISABLED;
}
sd->ctrl_handler = handler; sd->ctrl_handler = handler;
v4l2_set_subdevdata(sd, camif); v4l2_set_subdevdata(sd, camif);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment