aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/v4l1-compat.c
diff options
context:
space:
mode:
authorRussell King <rmk@arm.linux.org.uk>2009-03-29 07:12:27 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-04-06 20:43:50 -0400
commit9fc4d219b93ca0222f342fb3ca75bb62cc8be05c (patch)
treefc6008150612db9ed6ff96c62dafc1efe854b108 /drivers/media/video/v4l1-compat.c
parent80801da83389b2c6e55e1f8f5d17f923ce54f7c8 (diff)
V4L/DVB (11329): Fix buglets in v4l1 compatibility layer
The following patch fixes a few bugs I've noticed in the V4L1 compatibility layer: - VIDEO_MODE_AUTO for get/set input ioctls was not being handled - wrong V4L2 ioctl being used in v4l1_compat_select_tuner Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/v4l1-compat.c')
-rw-r--r--drivers/media/video/v4l1-compat.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/media/video/v4l1-compat.c b/drivers/media/video/v4l1-compat.c
index b617bf05e2d7..02f2a6d18b45 100644
--- a/drivers/media/video/v4l1-compat.c
+++ b/drivers/media/video/v4l1-compat.c
@@ -575,6 +575,8 @@ static noinline long v4l1_compat_get_input_info(
575 chan->norm = VIDEO_MODE_NTSC; 575 chan->norm = VIDEO_MODE_NTSC;
576 if (sid & V4L2_STD_SECAM) 576 if (sid & V4L2_STD_SECAM)
577 chan->norm = VIDEO_MODE_SECAM; 577 chan->norm = VIDEO_MODE_SECAM;
578 if (sid == V4L2_STD_ALL)
579 chan->norm = VIDEO_MODE_AUTO;
578 } 580 }
579done: 581done:
580 return err; 582 return err;
@@ -601,6 +603,9 @@ static noinline long v4l1_compat_set_input(
601 case VIDEO_MODE_SECAM: 603 case VIDEO_MODE_SECAM:
602 sid = V4L2_STD_SECAM; 604 sid = V4L2_STD_SECAM;
603 break; 605 break;
606 case VIDEO_MODE_AUTO:
607 sid = V4L2_STD_ALL;
608 break;
604 } 609 }
605 if (0 != sid) { 610 if (0 != sid) {
606 err = drv(file, VIDIOC_S_STD, &sid); 611 err = drv(file, VIDIOC_S_STD, &sid);
@@ -804,9 +809,9 @@ static noinline long v4l1_compat_select_tuner(
804 809
805 t.index = tun->tuner; 810 t.index = tun->tuner;
806 811
807 err = drv(file, VIDIOC_S_INPUT, &t); 812 err = drv(file, VIDIOC_S_TUNER, &t);
808 if (err < 0) 813 if (err < 0)
809 dprintk("VIDIOCSTUNER / VIDIOC_S_INPUT: %ld\n", err); 814 dprintk("VIDIOCSTUNER / VIDIOC_S_TUNER: %ld\n", err);
810 return err; 815 return err;
811} 816}
812 817