The patch number 12949 was added via Mauro Carvalho Chehab <[email protected]>
to http://linuxtv.org/hg/v4l-dvb master development tree.
Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel
If anyone has any objections, please let us know by sending a message to:
Linux Media Mailing List <[email protected]>
------
From: Mauro Carvalho Chehab <[email protected]>
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
---
linux/drivers/media/video/v4l1-compat.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff -r 0e0e97d47fb5 -r 0fb27357a365 linux/drivers/media/video/v4l1-compat.c
--- a/linux/drivers/media/video/v4l1-compat.c Thu Sep 17 10:01:48 2009 -0300
+++ b/linux/drivers/media/video/v4l1-compat.c Thu Sep 17 10:06:23 2009 -0300
@@ -565,10 +565,9 @@
break;
}
chan->norm = 0;
- err = drv(file, VIDIOC_G_STD, &sid);
- if (err < 0)
- dprintk("VIDIOCGCHAN / VIDIOC_G_STD: %ld\n", err);
- if (err == 0) {
+ /* Note: G_STD might not be present for radio receivers,
+ * so we should ignore any errors. */
+ if (drv(file, VIDIOC_G_STD, &sid) == 0) {
if (sid & V4L2_STD_PAL)
chan->norm = VIDEO_MODE_PAL;
if (sid & V4L2_STD_NTSC)
@@ -777,10 +776,9 @@
tun->flags |= VIDEO_TUNER_SECAM;
}
- err = drv(file, VIDIOC_G_STD, &sid);
- if (err < 0)
- dprintk("VIDIOCGTUNER / VIDIOC_G_STD: %ld\n", err);
- if (err == 0) {
+ /* Note: G_STD might not be present for radio receivers,
+ * so we should ignore any errors. */
+ if (drv(file, VIDIOC_G_STD, &sid) == 0) {
if (sid & V4L2_STD_PAL)
tun->mode = VIDEO_MODE_PAL;
if (sid & V4L2_STD_NTSC)
---
Patch is available at:
http://linuxtv.org/hg/v4l-dvb/rev/0fb27357a365482f5011f1ed60b48e4bb5a6b5a0
_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits