diff options
author | Michael Hunold <devnull@localhost> | 2004-10-26 16:46:10 +0000 |
---|---|---|
committer | Michael Hunold <devnull@localhost> | 2004-10-26 16:46:10 +0000 |
commit | 7086c1ee37d2f07aa94d61f22b0a9e2dfb0eee03 (patch) | |
tree | 02fd44d673e9dbf3738987ec48f00755a01f22f0 /linux/drivers/media/common/saa7146_vbi.c | |
parent | f49b28cb00eca5493b3a155e51da67e145c30d93 (diff) | |
download | mediapointer-dvb-s2-7086c1ee37d2f07aa94d61f22b0a9e2dfb0eee03.tar.gz mediapointer-dvb-s2-7086c1ee37d2f07aa94d61f22b0a9e2dfb0eee03.tar.bz2 |
- add back support for older kernels due to popular demand
Diffstat (limited to 'linux/drivers/media/common/saa7146_vbi.c')
-rw-r--r-- | linux/drivers/media/common/saa7146_vbi.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/linux/drivers/media/common/saa7146_vbi.c b/linux/drivers/media/common/saa7146_vbi.c index 48afdd0c5..2522762b5 100644 --- a/linux/drivers/media/common/saa7146_vbi.c +++ b/linux/drivers/media/common/saa7146_vbi.c @@ -214,9 +214,14 @@ static int buffer_activate(struct saa7146_dev *dev, return 0; } +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)) +static int buffer_prepare(struct file *file, struct videobuf_buffer *vb,enum v4l2_field field) +{ +#else static int buffer_prepare(void *priv, struct videobuf_buffer *vb,enum v4l2_field field) { struct file *file = priv; +#endif struct saa7146_fh *fh = file->private_data; struct saa7146_dev *dev = fh->dev; struct saa7146_buf *buf = (struct saa7146_buf *)vb; @@ -266,7 +271,11 @@ static int buffer_prepare(void *priv, struct videobuf_buffer *vb,enum v4l2_field return err; } +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)) +static int buffer_setup(struct file *file, unsigned int *count, unsigned int *size) +#else static int buffer_setup(void *priv, unsigned int *count, unsigned int *size) +#endif { int llength,lines; @@ -281,9 +290,14 @@ static int buffer_setup(void *priv, unsigned int *count, unsigned int *size) return 0; } +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)) +static void buffer_queue(struct file *file, struct videobuf_buffer *vb) +{ +#else static void buffer_queue(void *priv, struct videobuf_buffer *vb) { struct file *file = priv; +#endif struct saa7146_fh *fh = file->private_data; struct saa7146_dev *dev = fh->dev; struct saa7146_vv *vv = dev->vv_data; @@ -293,9 +307,14 @@ static void buffer_queue(void *priv, struct videobuf_buffer *vb) saa7146_buffer_queue(dev,&vv->vbi_q,buf); } +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)) +static void buffer_release(struct file *file, struct videobuf_buffer *vb) +{ +#else static void buffer_release(void *priv, struct videobuf_buffer *vb) { struct file *file = priv; +#endif struct saa7146_fh *fh = file->private_data; struct saa7146_dev *dev = fh->dev; struct saa7146_buf *buf = (struct saa7146_buf *)vb; @@ -484,8 +503,12 @@ static ssize_t vbi_read(struct file *file, char __user *data, size_t count, loff } mod_timer(&fh->vbi_read_timeout, jiffies+BUFFER_TIMEOUT); +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)) + ret = videobuf_read_stream(file, &fh->vbi_q, data, count, ppos, 1); +#else ret = videobuf_read_stream(file, &fh->vbi_q, data, count, ppos, 1, file->f_flags & O_NONBLOCK); +#endif /* printk("BASE_ODD3: 0x%08x\n", saa7146_read(dev, BASE_ODD3)); printk("BASE_EVEN3: 0x%08x\n", saa7146_read(dev, BASE_EVEN3)); |