From 8d87cb9f31930c7ac25d03043fa90cbd5313fe26 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sat, 20 Jan 2007 13:58:17 -0300 Subject: 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 --- drivers/media/video/cx88/cx88-vbi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'drivers/media/video/cx88/cx88-vbi.c') 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, -- cgit v1.2.3