Skip to content

Commit

Permalink
V4L/DVB (11264): omap24xxcam: Remove buffer type check from vidioc_s/…
Browse files Browse the repository at this point in the history
…g_parm

The v4l2-ioctl core now only allows buffer types for which the corresponding
->vidioc_try_fmt_xxx() methods are defined to be used in vidioc_(g|s)_parm.

This driver only defines ->vidioc_try_fmt_vid_cap() so only VIDEO_CAPTURE
buffers are allowed to be used with vidioc_s_parm() and vidioc_g_parm().

Cc: Sakari Ailus <sakari.ailus@nokia.com>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Trent Piepho authored and Mauro Carvalho Chehab committed Mar 30, 2009
1 parent 5a27578 commit 020b882
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions drivers/media/video/omap24xxcam.c
Original file line number Diff line number Diff line change
Expand Up @@ -1285,9 +1285,6 @@ static int vidioc_g_parm(struct file *file, void *fh,
struct omap24xxcam_device *cam = ofh->cam;
int rval;

if (a->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
return -EINVAL;

mutex_lock(&cam->mutex);
rval = vidioc_int_g_parm(cam->sdev, a);
mutex_unlock(&cam->mutex);
Expand All @@ -1303,9 +1300,6 @@ static int vidioc_s_parm(struct file *file, void *fh,
struct v4l2_streamparm old_streamparm;
int rval;

if (a->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
return -EINVAL;

mutex_lock(&cam->mutex);
if (cam->streaming) {
rval = -EBUSY;
Expand Down

0 comments on commit 020b882

Please sign in to comment.