diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-09-19 12:02:12 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-09-21 20:07:29 -0400 |
commit | c7854c2c5d692a329b4d9a9a73bcf36ae137ee7c (patch) | |
tree | a10da2a77603967361a7f12773a218be4fb13d03 | |
parent | 91235537bc4b53f0b6f953acf963bcbb6215c49c (diff) |
[media] em28xx: fix VBI handling logic
When both VBI and video are streaming, and video stream is stopped,
a subsequent trial to restart it will fail, because S_FMT will
return -EBUSY.
That prevents applications like zvbi to work properly.
Please notice that, while this fix it fully for zvbi, the
best is to get rid of streaming_users and res_get logic as a hole.
However, this single-line patch is better to be merged at -stable.
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rw-r--r-- | drivers/media/usb/em28xx/em28xx-video.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-video.c b/drivers/media/usb/em28xx/em28xx-video.c index 90dec2955f1c..41339259f30c 100644 --- a/drivers/media/usb/em28xx/em28xx-video.c +++ b/drivers/media/usb/em28xx/em28xx-video.c | |||
@@ -1342,7 +1342,7 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *priv, | |||
1342 | struct em28xx *dev = video_drvdata(file); | 1342 | struct em28xx *dev = video_drvdata(file); |
1343 | struct em28xx_v4l2 *v4l2 = dev->v4l2; | 1343 | struct em28xx_v4l2 *v4l2 = dev->v4l2; |
1344 | 1344 | ||
1345 | if (v4l2->streaming_users > 0) | 1345 | if (vb2_is_busy(&v4l2->vb_vidq)) |
1346 | return -EBUSY; | 1346 | return -EBUSY; |
1347 | 1347 | ||
1348 | vidioc_try_fmt_vid_cap(file, priv, f); | 1348 | vidioc_try_fmt_vid_cap(file, priv, f); |