提交 97caa318 编写于 作者: H Hans Verkuil 提交者: Mauro Carvalho Chehab

[media] hdpvr: small fixes

- return EBUSY instead of EAGAIN.
- add missing break.
- remove unnecessary buf type check (done by the core).
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 41022fcb
...@@ -594,7 +594,7 @@ static int vidioc_s_input(struct file *file, void *private_data, ...@@ -594,7 +594,7 @@ static int vidioc_s_input(struct file *file, void *private_data,
return -EINVAL; return -EINVAL;
if (dev->status != STATUS_IDLE) if (dev->status != STATUS_IDLE)
return -EAGAIN; return -EBUSY;
retval = hdpvr_config_call(dev, CTRL_VIDEO_INPUT_VALUE, index+1); retval = hdpvr_config_call(dev, CTRL_VIDEO_INPUT_VALUE, index+1);
if (!retval) if (!retval)
...@@ -646,7 +646,7 @@ static int vidioc_s_audio(struct file *file, void *private_data, ...@@ -646,7 +646,7 @@ static int vidioc_s_audio(struct file *file, void *private_data,
return -EINVAL; return -EINVAL;
if (dev->status != STATUS_IDLE) if (dev->status != STATUS_IDLE)
return -EAGAIN; return -EBUSY;
retval = hdpvr_set_audio(dev, audio->index+1, dev->options.audio_codec); retval = hdpvr_set_audio(dev, audio->index+1, dev->options.audio_codec);
if (!retval) if (!retval)
...@@ -777,7 +777,7 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *private_data, ...@@ -777,7 +777,7 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *private_data,
struct v4l2_fmtdesc *f) struct v4l2_fmtdesc *f)
{ {
if (f->index != 0 || f->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) if (f->index != 0)
return -EINVAL; return -EINVAL;
f->flags = V4L2_FMT_FLAG_COMPRESSED; f->flags = V4L2_FMT_FLAG_COMPRESSED;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册