summaryrefslogtreecommitdiff
path: root/linux/drivers/media/common/saa7146_vbi.c
diff options
context:
space:
mode:
authorJohannes Stezenbach <devnull@localhost>2005-07-16 16:13:28 +0000
committerJohannes Stezenbach <devnull@localhost>2005-07-16 16:13:28 +0000
commit64c0538be64e95fafbb6a9c8eb8be0ee79a8ed71 (patch)
tree1883e92ab822de216bfc539efa3deede89b92ca5 /linux/drivers/media/common/saa7146_vbi.c
parenta0ba7ba1dd99d05426eb932f1f3fa27c0f3a33f8 (diff)
downloadmediapointer-dvb-s2-64c0538be64e95fafbb6a9c8eb8be0ee79a8ed71.tar.gz
mediapointer-dvb-s2-64c0538be64e95fafbb6a9c8eb8be0ee79a8ed71.tar.bz2
Remove all #include <linux/version.h> and all references
to LINUX_VERSION_CODE and KERNEL_VERSION. Based on patch by Olaf Hering. Signed-off-by: Olaf Hering <olh@suse.de> Signed-off-by: Johannes Stezenbach <js@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/common/saa7146_vbi.c')
-rw-r--r--linux/drivers/media/common/saa7146_vbi.c34
1 files changed, 2 insertions, 32 deletions
diff --git a/linux/drivers/media/common/saa7146_vbi.c b/linux/drivers/media/common/saa7146_vbi.c
index d75d12157..8f65e154f 100644
--- a/linux/drivers/media/common/saa7146_vbi.c
+++ b/linux/drivers/media/common/saa7146_vbi.c
@@ -214,14 +214,9 @@ 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(struct videobuf_queue *q, struct videobuf_buffer *vb,enum v4l2_field field)
{
struct file *file = q->priv_data;
-#endif
struct saa7146_fh *fh = file->private_data;
struct saa7146_dev *dev = fh->dev;
struct saa7146_buf *buf = (struct saa7146_buf *)vb;
@@ -271,11 +266,7 @@ static int buffer_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb,e
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(struct videobuf_queue *q, unsigned int *count, unsigned int *size)
-#endif
{
int llength,lines;
@@ -290,14 +281,9 @@ static int buffer_setup(struct videobuf_queue *q, unsigned int *count, unsigned
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(struct videobuf_queue *q, struct videobuf_buffer *vb)
{
struct file *file = q->priv_data;
-#endif
struct saa7146_fh *fh = file->private_data;
struct saa7146_dev *dev = fh->dev;
struct saa7146_vv *vv = dev->vv_data;
@@ -307,14 +293,9 @@ static void buffer_queue(struct videobuf_queue *q, 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(struct videobuf_queue *q, struct videobuf_buffer *vb)
{
struct file *file = q->priv_data;
-#endif
struct saa7146_fh *fh = file->private_data;
struct saa7146_dev *dev = fh->dev;
struct saa7146_buf *buf = (struct saa7146_buf *)vb;
@@ -354,11 +335,7 @@ static void vbi_stop(struct saa7146_fh *fh, struct file *file)
saa7146_buffer_finish(dev,&vv->vbi_q,STATE_DONE);
}
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10))
- videobuf_queue_cancel(file,&fh->vbi_q);
-#else
videobuf_queue_cancel(&fh->vbi_q);
-#endif
vv->vbi_streaming = NULL;
@@ -431,11 +408,8 @@ static int vbi_open(struct saa7146_dev *dev, struct file *file)
dev->pci, &dev->slock,
V4L2_BUF_TYPE_VBI_CAPTURE,
V4L2_FIELD_SEQ_TB, // FIXME: does this really work?
- sizeof(struct saa7146_buf)
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)
- ,file
-#endif
- );
+ sizeof(struct saa7146_buf),
+ file);
init_MUTEX(&fh->vbi_q.lock);
init_timer(&fh->vbi_read_timeout);
@@ -511,12 +485,8 @@ 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(&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));