diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-11-20 14:19:20 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-11-20 14:19:20 -0200 |
commit | a4368a67e2cfa7868299cf7b20bf87352e351e33 (patch) | |
tree | e142e6f21e41c3b95d73e5f805247514fbb286c5 /linux/drivers/media/video/vivi.c | |
parent | 879cc80f662158ef1a7e0549e5c6efd3380642df (diff) | |
download | mediapointer-dvb-s2-a4368a67e2cfa7868299cf7b20bf87352e351e33.tar.gz mediapointer-dvb-s2-a4368a67e2cfa7868299cf7b20bf87352e351e33.tar.bz2 |
Remove the need of a STD array for drivers using video_ioctl2
From: Mauro Carvalho Chehab <mchehab@infradead.org>
CC: Jonathan Corbet <corbet@lwn.net>
video_ioctl2 will auto-generate standard entries at ENUM_FMT.
Also, now, a driver may return a subset of the video array at
the return, to be stored as the current_norm.
For example, a driver may ask for V4L2_STD_PAL. At return,
driver may change it to V4L2_STD_PAL_B. This way, a futher call
to G_STD will return the exact detected video std.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/vivi.c')
-rw-r--r-- | linux/drivers/media/video/vivi.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/linux/drivers/media/video/vivi.c b/linux/drivers/media/video/vivi.c index 61672a219..9b1407426 100644 --- a/linux/drivers/media/video/vivi.c +++ b/linux/drivers/media/video/vivi.c @@ -1119,16 +1119,8 @@ static int vidioc_streamoff(struct file *file, void *priv, enum v4l2_buf_type i) return (0); } -static struct v4l2_tvnorm tvnorms[] = { - { - .name = "NTSC-M", - .id = V4L2_STD_NTSC_M, - } -}; - -static int vidioc_s_std (struct file *file, void *priv, v4l2_std_id a) +static int vidioc_s_std (struct file *file, void *priv, v4l2_std_id *i) { - return 0; } @@ -1414,8 +1406,8 @@ static struct video_device vivi = { #ifdef CONFIG_VIDEO_V4L1_COMPAT .vidiocgmbuf = vidiocgmbuf, #endif - .tvnorms = tvnorms, - .tvnormsize = ARRAY_SIZE(tvnorms), + .tvnorms = V4L2_STD_NTSC_M, + .current_norm = V4L2_STD_NTSC_M, }; /* ----------------------------------------------------------------- Initialization and module stuff @@ -1442,8 +1434,6 @@ static int __init vivi_init(void) dev->vidq.timeout.data = (unsigned long)dev; init_timer(&dev->vidq.timeout); - vivi.current_norm = tvnorms[0].id; - ret = video_register_device(&vivi, VFL_TYPE_GRABBER, video_nr); printk(KERN_INFO "Video Technology Magazine Virtual Video Capture Board (Load status: %d)\n", ret); return ret; |