diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-01-20 11:58:17 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-02-21 10:34:42 -0500 |
commit | 8d87cb9f31930c7ac25d03043fa90cbd5313fe26 (patch) | |
tree | f98c3dee7886ed7c2405c9e97ad534c1ea46c6c6 /drivers/media/video/cx88/cx88-vbi.c | |
parent | fd69496461050296fb0fdd9acf6d789d27a0ef44 (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.c | 7 |
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 aa2a69770098..b6b968851d71 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]"); | |||
21 | 21 | ||
22 | /* ------------------------------------------------------------------ */ | 22 | /* ------------------------------------------------------------------ */ |
23 | 23 | ||
24 | void cx8800_vbi_fmt(struct cx8800_dev *dev, struct v4l2_format *f) | 24 | int cx8800_vbi_fmt (struct file *file, void *priv, |
25 | struct v4l2_format *f) | ||
25 | { | 26 | { |
26 | memset(&f->fmt.vbi,0,sizeof(f->fmt.vbi)); | 27 | struct cx8800_fh *fh = priv; |
28 | struct cx8800_dev *dev = fh->dev; | ||
27 | 29 | ||
28 | f->fmt.vbi.samples_per_line = VBI_LINE_LENGTH; | 30 | f->fmt.vbi.samples_per_line = VBI_LINE_LENGTH; |
29 | f->fmt.vbi.sample_format = V4L2_PIX_FMT_GREY; | 31 | 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) | |||
43 | f->fmt.vbi.start[0] = 7 -1; | 45 | f->fmt.vbi.start[0] = 7 -1; |
44 | f->fmt.vbi.start[1] = 319 -1; | 46 | f->fmt.vbi.start[1] = 319 -1; |
45 | } | 47 | } |
48 | return 0; | ||
46 | } | 49 | } |
47 | 50 | ||
48 | static int cx8800_start_vbi_dma(struct cx8800_dev *dev, | 51 | static int cx8800_start_vbi_dma(struct cx8800_dev *dev, |