diff options
author | Kenneth Aafloy <devnull@localhost> | 2004-11-16 14:23:36 +0000 |
---|---|---|
committer | Kenneth Aafloy <devnull@localhost> | 2004-11-16 14:23:36 +0000 |
commit | 070620158ef9755801329fc9b567070b8b19da38 (patch) | |
tree | af3e59882e4680cbe04d1520454b26ce445232a6 /linux/drivers/media/common/saa7146_vbi.c | |
parent | 5c7692558a1136078b55837599894e816f2786e3 (diff) | |
download | mediapointer-dvb-s2-070620158ef9755801329fc9b567070b8b19da38.tar.gz mediapointer-dvb-s2-070620158ef9755801329fc9b567070b8b19da38.tar.bz2 |
- videobuf api changes in 2.6.10
Diffstat (limited to 'linux/drivers/media/common/saa7146_vbi.c')
-rw-r--r-- | linux/drivers/media/common/saa7146_vbi.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/linux/drivers/media/common/saa7146_vbi.c b/linux/drivers/media/common/saa7146_vbi.c index 8a07e95df..ecbd93eee 100644 --- a/linux/drivers/media/common/saa7146_vbi.c +++ b/linux/drivers/media/common/saa7146_vbi.c @@ -218,9 +218,9 @@ static int buffer_activate(struct saa7146_dev *dev, 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) +static int buffer_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb,enum v4l2_field field) { - struct file *file = priv; + struct file *file = q->priv_data; #endif struct saa7146_fh *fh = file->private_data; struct saa7146_dev *dev = fh->dev; @@ -274,7 +274,7 @@ static int buffer_prepare(void *priv, struct videobuf_buffer *vb,enum v4l2_field #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) +static int buffer_setup(struct videobuf_queue *q, unsigned int *count, unsigned int *size) #endif { int llength,lines; @@ -294,9 +294,9 @@ static int buffer_setup(void *priv, unsigned int *count, unsigned int *size) static void buffer_queue(struct file *file, struct videobuf_buffer *vb) { #else -static void buffer_queue(void *priv, struct videobuf_buffer *vb) +static void buffer_queue(struct videobuf_queue *q, struct videobuf_buffer *vb) { - struct file *file = priv; + struct file *file = q->priv_data; #endif struct saa7146_fh *fh = file->private_data; struct saa7146_dev *dev = fh->dev; @@ -311,9 +311,9 @@ static void buffer_queue(void *priv, struct videobuf_buffer *vb) static void buffer_release(struct file *file, struct videobuf_buffer *vb) { #else -static void buffer_release(void *priv, struct videobuf_buffer *vb) +static void buffer_release(struct videobuf_queue *q, struct videobuf_buffer *vb) { - struct file *file = priv; + struct file *file = q->priv_data; #endif struct saa7146_fh *fh = file->private_data; struct saa7146_dev *dev = fh->dev; @@ -354,7 +354,11 @@ 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; @@ -427,7 +431,11 @@ 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)); + sizeof(struct saa7146_buf) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10) + ,file +#endif + ); init_MUTEX(&fh->vbi_q.lock); init_timer(&fh->vbi_read_timeout); @@ -506,7 +514,7 @@ static ssize_t vbi_read(struct file *file, char __user *data, size_t count, loff #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, + ret = videobuf_read_stream(&fh->vbi_q, data, count, ppos, 1, file->f_flags & O_NONBLOCK); #endif /* |