mirror of
https://github.com/torvalds/linux
synced 2024-10-23 03:37:40 +00:00
[media] v4l: omap4iss: Don't use v4l2_g_ext_ctrls() internally
Instead of using the extended control API internally to get the sensor pixel rate, use the dedicated in-kernel APIs (find the control with v4l2_ctrl_find() and get its value with v4l2_ctrl_g_ctrl_int64()). Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
d632dfefd3
commit
ea72717e96
|
@ -121,8 +121,7 @@ int omap4iss_get_external_info(struct iss_pipeline *pipe,
|
||||||
struct iss_device *iss =
|
struct iss_device *iss =
|
||||||
container_of(pipe, struct iss_video, pipe)->iss;
|
container_of(pipe, struct iss_video, pipe)->iss;
|
||||||
struct v4l2_subdev_format fmt;
|
struct v4l2_subdev_format fmt;
|
||||||
struct v4l2_ext_controls ctrls;
|
struct v4l2_ctrl *ctrl;
|
||||||
struct v4l2_ext_control ctrl;
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!pipe->external)
|
if (!pipe->external)
|
||||||
|
@ -142,23 +141,15 @@ int omap4iss_get_external_info(struct iss_pipeline *pipe,
|
||||||
|
|
||||||
pipe->external_bpp = omap4iss_video_format_info(fmt.format.code)->bpp;
|
pipe->external_bpp = omap4iss_video_format_info(fmt.format.code)->bpp;
|
||||||
|
|
||||||
memset(&ctrls, 0, sizeof(ctrls));
|
ctrl = v4l2_ctrl_find(pipe->external->ctrl_handler,
|
||||||
memset(&ctrl, 0, sizeof(ctrl));
|
V4L2_CID_PIXEL_RATE);
|
||||||
|
if (ctrl == NULL) {
|
||||||
ctrl.id = V4L2_CID_PIXEL_RATE;
|
|
||||||
|
|
||||||
ctrls.ctrl_class = V4L2_CTRL_ID2CLASS(ctrl.id);
|
|
||||||
ctrls.count = 1;
|
|
||||||
ctrls.controls = &ctrl;
|
|
||||||
|
|
||||||
ret = v4l2_g_ext_ctrls(pipe->external->ctrl_handler, &ctrls);
|
|
||||||
if (ret < 0) {
|
|
||||||
dev_warn(iss->dev, "no pixel rate control in subdev %s\n",
|
dev_warn(iss->dev, "no pixel rate control in subdev %s\n",
|
||||||
pipe->external->name);
|
pipe->external->name);
|
||||||
return ret;
|
return -EPIPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
pipe->external_rate = ctrl.value64;
|
pipe->external_rate = v4l2_ctrl_g_ctrl_int64(ctrl);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue