aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video/cx88/cx88-vbi.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-01-20 13:58:17 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-02-21 13:34:42 -0200
commit8d87cb9f31930c7ac25d03043fa90cbd5313fe26 (patch)
treef98c3dee7886ed7c2405c9e97ad534c1ea46c6c6 /drivers/media/video/cx88/cx88-vbi.c
parentfd69496461050296fb0fdd9acf6d789d27a0ef44 (diff)
V4L/DVB (5097): Convert cx8800 driver to video_ioctl2 handler
video_ioctl2 handler provides V4L2 API parsing. Using it makes the driver simpler, and isolates API parsing. This allows future reusage of driver controls using other ways, like sysfs and/or procfs and increases isolation of driver-specific handling from the generic common ioctl processing. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/cx88/cx88-vbi.c')
-rw-r--r--drivers/media/video/cx88/cx88-vbi.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/media/video/cx88/cx88-vbi.c b/drivers/media/video/cx88/cx88-vbi.c
index aa2a6977009..b6b968851d7 100644
--- a/drivers/media/video/cx88/cx88-vbi.c
+++ b/drivers/media/video/cx88/cx88-vbi.c
@@ -21,9 +21,11 @@ MODULE_PARM_DESC(vbi_debug,"enable debug messages [vbi]");
/* ------------------------------------------------------------------ */
-void cx8800_vbi_fmt(struct cx8800_dev *dev, struct v4l2_format *f)
+int cx8800_vbi_fmt (struct file *file, void *priv,
+ struct v4l2_format *f)
{
- memset(&f->fmt.vbi,0,sizeof(f->fmt.vbi));
+ struct cx8800_fh *fh = priv;
+ struct cx8800_dev *dev = fh->dev;
f->fmt.vbi.samples_per_line = VBI_LINE_LENGTH;
f->fmt.vbi.sample_format = V4L2_PIX_FMT_GREY;
@@ -43,6 +45,7 @@ void cx8800_vbi_fmt(struct cx8800_dev *dev, struct v4l2_format *f)
f->fmt.vbi.start[0] = 7 -1;
f->fmt.vbi.start[1] = 319 -1;
}
+ return 0;
}
static int cx8800_start_vbi_dma(struct cx8800_dev *dev,