Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] au0828: enable VBI timeout when calling read() without streamon()

Because some clients (e.g. tvtime) will just open the filehandle and call
read() instead of explicitly calling streamon first, we need to make sure the
VBI timeout routine gets enabled in this case.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

authored by

Devin Heitmueller and committed by
Mauro Carvalho Chehab
bf797165 78ca5005

+7
+7
drivers/media/video/au0828/au0828-video.c
··· 1116 1116 if (!res_get(fh, AU0828_RESOURCE_VBI)) 1117 1117 return -EBUSY; 1118 1118 1119 + if (dev->vbi_timeout_running == 0) { 1120 + /* Handle case where caller tries to read without 1121 + calling streamon first */ 1122 + dev->vbi_timeout_running = 1; 1123 + mod_timer(&dev->vbi_timeout, jiffies + (HZ / 10)); 1124 + } 1125 + 1119 1126 return videobuf_read_stream(&fh->vb_vbiq, buf, count, pos, 0, 1120 1127 filp->f_flags & O_NONBLOCK); 1121 1128 }