summaryrefslogtreecommitdiff
path: root/linux/drivers/media
diff options
context:
space:
mode:
authorMichael Hunold <devnull@localhost>2004-10-25 13:41:25 +0000
committerMichael Hunold <devnull@localhost>2004-10-25 13:41:25 +0000
commit413458cbd323574f947dd84d8a0183fbe63ac412 (patch)
tree26b170209ab5bbdf6cad2cbe61d4b9836c22e116 /linux/drivers/media
parentd3655c86e2e0515ec4e5264fb738da075eb6d05f (diff)
downloadmediapointer-dvb-s2-413458cbd323574f947dd84d8a0183fbe63ac412.tar.gz
mediapointer-dvb-s2-413458cbd323574f947dd84d8a0183fbe63ac412.tar.bz2
- follow latest changes in 2.6.10-rc1 regarding video-buf. this change
breaks compilation with older kernels for dvb-ttpci
Diffstat (limited to 'linux/drivers/media')
-rw-r--r--linux/drivers/media/common/saa7146_fops.c2
-rw-r--r--linux/drivers/media/common/saa7146_vbi.c14
-rw-r--r--linux/drivers/media/common/saa7146_video.c17
3 files changed, 21 insertions, 12 deletions
diff --git a/linux/drivers/media/common/saa7146_fops.c b/linux/drivers/media/common/saa7146_fops.c
index cd3e5c6d0..427372a55 100644
--- a/linux/drivers/media/common/saa7146_fops.c
+++ b/linux/drivers/media/common/saa7146_fops.c
@@ -362,7 +362,7 @@ static unsigned int fops_poll(struct file *file, struct poll_table_struct *wait)
if (V4L2_BUF_TYPE_VBI_CAPTURE == fh->type) {
if( 0 == fh->vbi_q.streaming )
- return videobuf_poll_stream(file, &fh->vbi_q, wait);
+ return videobuf_poll_stream(file, file->private_data, &fh->vbi_q, wait);
q = &fh->vbi_q;
} else {
DEB_D(("using video queue.\n"));
diff --git a/linux/drivers/media/common/saa7146_vbi.c b/linux/drivers/media/common/saa7146_vbi.c
index e4cdfc421..48afdd0c5 100644
--- a/linux/drivers/media/common/saa7146_vbi.c
+++ b/linux/drivers/media/common/saa7146_vbi.c
@@ -214,8 +214,9 @@ static int buffer_activate(struct saa7146_dev *dev,
return 0;
}
-static int buffer_prepare(struct file *file, struct videobuf_buffer *vb,enum v4l2_field field)
+static int buffer_prepare(void *priv, struct videobuf_buffer *vb,enum v4l2_field field)
{
+ struct file *file = priv;
struct saa7146_fh *fh = file->private_data;
struct saa7146_dev *dev = fh->dev;
struct saa7146_buf *buf = (struct saa7146_buf *)vb;
@@ -265,7 +266,7 @@ static int buffer_prepare(struct file *file, struct videobuf_buffer *vb,enum v4l
return err;
}
-static int buffer_setup(struct file *file, unsigned int *count, unsigned int *size)
+static int buffer_setup(void *priv, unsigned int *count, unsigned int *size)
{
int llength,lines;
@@ -280,8 +281,9 @@ static int buffer_setup(struct file *file, unsigned int *count, unsigned int *si
return 0;
}
-static void buffer_queue(struct file *file, struct videobuf_buffer *vb)
+static void buffer_queue(void *priv, struct videobuf_buffer *vb)
{
+ struct file *file = priv;
struct saa7146_fh *fh = file->private_data;
struct saa7146_dev *dev = fh->dev;
struct saa7146_vv *vv = dev->vv_data;
@@ -291,8 +293,9 @@ static void buffer_queue(struct file *file, struct videobuf_buffer *vb)
saa7146_buffer_queue(dev,&vv->vbi_q,buf);
}
-static void buffer_release(struct file *file, struct videobuf_buffer *vb)
+static void buffer_release(void *priv, struct videobuf_buffer *vb)
{
+ struct file *file = priv;
struct saa7146_fh *fh = file->private_data;
struct saa7146_dev *dev = fh->dev;
struct saa7146_buf *buf = (struct saa7146_buf *)vb;
@@ -481,7 +484,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);
- ret = videobuf_read_stream(file, &fh->vbi_q, data, count, ppos, 1);
+ ret = videobuf_read_stream(file, &fh->vbi_q, data, count, ppos, 1,
+ file->f_flags & O_NONBLOCK);
/*
printk("BASE_ODD3: 0x%08x\n", saa7146_read(dev, BASE_ODD3));
printk("BASE_EVEN3: 0x%08x\n", saa7146_read(dev, BASE_EVEN3));
diff --git a/linux/drivers/media/common/saa7146_video.c b/linux/drivers/media/common/saa7146_video.c
index 05632374b..6f6edcb90 100644
--- a/linux/drivers/media/common/saa7146_video.c
+++ b/linux/drivers/media/common/saa7146_video.c
@@ -1154,7 +1154,7 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int
case VIDIOC_DQBUF: {
struct v4l2_buffer *buf = arg;
int ret = 0;
- ret = videobuf_dqbuf(file,q,buf);
+ ret = videobuf_dqbuf(file,q,buf,file->f_flags & O_NONBLOCK);
DEB_D(("VIDIOC_DQBUF: ret:%d, index:%d\n",ret,buf->index));
return ret;
}
@@ -1247,8 +1247,9 @@ static int buffer_activate (struct saa7146_dev *dev,
return 0;
}
-static int buffer_prepare(struct file *file, struct videobuf_buffer *vb, enum v4l2_field field)
+static int buffer_prepare(void *priv, struct videobuf_buffer *vb, enum v4l2_field field)
{
+ struct file *file = priv;
struct saa7146_fh *fh = file->private_data;
struct saa7146_dev *dev = fh->dev;
struct saa7146_vv *vv = dev->vv_data;
@@ -1329,8 +1330,9 @@ static int buffer_prepare(struct file *file, struct videobuf_buffer *vb, enum v4
return err;
}
-static int buffer_setup(struct file *file, unsigned int *count, unsigned int *size)
+static int buffer_setup(void *priv, unsigned int *count, unsigned int *size)
{
+ struct file *file = priv;
struct saa7146_fh *fh = file->private_data;
if (0 == *count || *count > MAX_SAA7146_CAPTURE_BUFFERS)
@@ -1348,8 +1350,9 @@ static int buffer_setup(struct file *file, unsigned int *count, unsigned int *si
return 0;
}
-static void buffer_queue(struct file *file, struct videobuf_buffer *vb)
+static void buffer_queue(void *priv, struct videobuf_buffer *vb)
{
+ struct file *file = priv;
struct saa7146_fh *fh = file->private_data;
struct saa7146_dev *dev = fh->dev;
struct saa7146_vv *vv = dev->vv_data;
@@ -1360,8 +1363,9 @@ static void buffer_queue(struct file *file, struct videobuf_buffer *vb)
}
-static void buffer_release(struct file *file, struct videobuf_buffer *vb)
+static void buffer_release(void *priv, struct videobuf_buffer *vb)
{
+ struct file *file = priv;
struct saa7146_fh *fh = file->private_data;
struct saa7146_dev *dev = fh->dev;
struct saa7146_buf *buf = (struct saa7146_buf *)vb;
@@ -1481,7 +1485,8 @@ static ssize_t video_read(struct file *file, char __user *data, size_t count, lo
goto out;
}
- ret = videobuf_read_one(file,&fh->video_q , data, count, ppos);
+ ret = videobuf_read_one(file,&fh->video_q , data, count, ppos,
+ file->f_flags & O_NONBLOCK);
if (ret != 0) {
video_end(fh, file);
} else {