summaryrefslogtreecommitdiff
path: root/linux/drivers/media/common/saa7146_video.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/common/saa7146_video.c')
-rw-r--r--linux/drivers/media/common/saa7146_video.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/linux/drivers/media/common/saa7146_video.c b/linux/drivers/media/common/saa7146_video.c
index 01a11997a..ab6593c16 100644
--- a/linux/drivers/media/common/saa7146_video.c
+++ b/linux/drivers/media/common/saa7146_video.c
@@ -704,7 +704,7 @@ static int video_begin(struct saa7146_fh *fh)
return 0;
}
-static int video_end(struct saa7146_fh *fh)
+static int video_end(struct saa7146_fh *fh, struct file *file)
{
struct saa7146_dev *dev = fh->dev;
struct saa7146_vv *vv = dev->vv_data;
@@ -1094,10 +1094,8 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int
int *type = arg;
DEB_D(("VIDIOC_STREAMON, type:%d\n",*type));
- if( 0 != ops->capture_begin ) {
- if( 0 != (err = ops->capture_begin(fh))) {
+ if( 0 != (err = video_begin(fh))) {
return err;
- }
}
err = videobuf_streamon(file,q);
return err;
@@ -1106,9 +1104,7 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int
int *type = arg;
DEB_D(("VIDIOC_STREAMOFF, type:%d\n",*type));
- if( 0 != ops->capture_end ) {
- ops->capture_end(fh);
- }
+ video_end(fh, file);
err = videobuf_streamoff(file,q);
return err;
}
@@ -1314,8 +1310,9 @@ static void video_init(struct saa7146_dev *dev, struct saa7146_vv *vv)
}
-static void video_open(struct saa7146_dev *dev, struct saa7146_fh *fh)
+static void video_open(struct saa7146_dev *dev, struct file *file)
{
+ struct saa7146_fh *fh = (struct saa7146_fh *)file->private_data;
struct saa7146_format *sfmt;
fh->video_fmt.width = 384;
@@ -1336,8 +1333,9 @@ static void video_open(struct saa7146_dev *dev, struct saa7146_fh *fh)
}
-static void video_close(struct saa7146_dev *dev, struct saa7146_fh *fh, struct file *file)
+static void video_close(struct saa7146_dev *dev, struct file *file)
{
+ struct saa7146_fh *fh = (struct saa7146_fh *)file->private_data;
struct saa7146_vv *vv = dev->vv_data;
unsigned long flags;
@@ -1350,7 +1348,7 @@ static void video_close(struct saa7146_dev *dev, struct saa7146_fh *fh, struct f
}
if( fh == vv->streaming ) {
- video_end(fh);
+ video_end(fh, file);
}
}
@@ -1394,7 +1392,7 @@ static ssize_t video_read(struct file *file, char *data, size_t count, loff_t *p
return -EAGAIN;
}
ret = videobuf_read_one(file,&fh->video_q , data, count, ppos);
- video_end(fh);
+ video_end(fh, file);
/* restart overlay if it was active before */
if( 0 != restart_overlay ) {
@@ -1410,6 +1408,4 @@ struct saa7146_use_ops saa7146_video_uops = {
.release = video_close,
.irq_done = video_irq_done,
.read = video_read,
- .capture_begin = video_begin,
- .capture_end = video_end,
};