mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-13 14:24:11 +08:00
[media] ov7670: fix g/s_parm
Drop unnecesary memset. Drop the unnecessary extendedmode check and set the V4L2_CAP_TIMEPERFRAME capability. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
parent
7d1b8619ea
commit
d569e90bb7
@ -1046,7 +1046,6 @@ static int ov7670_g_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *parms)
|
||||
if (parms->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
|
||||
return -EINVAL;
|
||||
|
||||
memset(cp, 0, sizeof(struct v4l2_captureparm));
|
||||
cp->capability = V4L2_CAP_TIMEPERFRAME;
|
||||
info->devtype->get_framerate(sd, &cp->timeperframe);
|
||||
|
||||
@ -1061,9 +1060,8 @@ static int ov7670_s_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *parms)
|
||||
|
||||
if (parms->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
|
||||
return -EINVAL;
|
||||
if (cp->extendedmode != 0)
|
||||
return -EINVAL;
|
||||
|
||||
cp->capability = V4L2_CAP_TIMEPERFRAME;
|
||||
return info->devtype->set_framerate(sd, tpf);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user