summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorMichael Hunold <devnull@localhost>2003-12-15 20:54:10 +0000
committerMichael Hunold <devnull@localhost>2003-12-15 20:54:10 +0000
commit8ee8836220158e91941b7d508b5179bd49c5944d (patch)
tree56181f889a882e6da2c0558e5a26911905149bbf /linux
parentb12f792f25aafd619d357cd987fd6682ee405e11 (diff)
downloadmediapointer-dvb-s2-8ee8836220158e91941b7d508b5179bd49c5944d.tar.gz
mediapointer-dvb-s2-8ee8836220158e91941b7d508b5179bd49c5944d.tar.bz2
- fix compilation
- more video/vbi open/release fixes
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/common/saa7146_fops.c8
-rw-r--r--linux/drivers/media/common/saa7146_vbi.c19
-rw-r--r--linux/drivers/media/common/saa7146_video.c22
-rw-r--r--linux/include/media/saa7146_vv.h6
4 files changed, 26 insertions, 29 deletions
diff --git a/linux/drivers/media/common/saa7146_fops.c b/linux/drivers/media/common/saa7146_fops.c
index 8eb253bd8..654814421 100644
--- a/linux/drivers/media/common/saa7146_fops.c
+++ b/linux/drivers/media/common/saa7146_fops.c
@@ -229,10 +229,10 @@ static int fops_open(struct inode *inode, struct file *file)
if( fh->type == V4L2_BUF_TYPE_VBI_CAPTURE) {
DEB_S(("initializing vbi...\n"));
- saa7146_vbi_uops.open(dev,fh);
+ saa7146_vbi_uops.open(dev,file);
} else {
DEB_S(("initializing video...\n"));
- saa7146_video_uops.open(dev,fh);
+ saa7146_video_uops.open(dev,file);
}
result = 0;
@@ -255,9 +255,9 @@ static int fops_release(struct inode *inode, struct file *file)
return -ERESTARTSYS;
if( fh->type == V4L2_BUF_TYPE_VBI_CAPTURE) {
- saa7146_vbi_uops.release(dev,fh,file);
+ saa7146_vbi_uops.release(dev,file);
} else {
- saa7146_video_uops.release(dev,fh,file);
+ saa7146_video_uops.release(dev,file);
}
module_put(dev->ext->module);
diff --git a/linux/drivers/media/common/saa7146_vbi.c b/linux/drivers/media/common/saa7146_vbi.c
index f9a815cc8..da9332f97 100644
--- a/linux/drivers/media/common/saa7146_vbi.c
+++ b/linux/drivers/media/common/saa7146_vbi.c
@@ -310,7 +310,7 @@ static struct videobuf_queue_ops vbi_qops = {
/* ------------------------------------------------------------------ */
-static void vbi_stop(struct saa7146_fh *fh)
+static void vbi_stop(struct saa7146_fh *fh, struct file *file)
{
struct saa7146_dev *dev = fh->dev;
struct saa7146_vv *vv = dev->vv_data;
@@ -344,12 +344,13 @@ static void vbi_stop(struct saa7146_fh *fh)
static void vbi_read_timeout(unsigned long data)
{
- struct saa7146_fh *fh = (struct saa7146_fh *)data;
+ struct file *file = (struct file*)data;
+ struct saa7146_fh *fh = file->private_data;
struct saa7146_dev *dev = fh->dev;
DEB_VBI(("dev:%p, fh:%p\n",dev, fh));
- vbi_stop(fh);
+ vbi_stop(fh, file);
}
static void vbi_init(struct saa7146_dev *dev, struct saa7146_vv *vv)
@@ -366,8 +367,10 @@ static void vbi_init(struct saa7146_dev *dev, struct saa7146_vv *vv)
init_waitqueue_head(&vv->vbi_wq);
}
-static void vbi_open(struct saa7146_dev *dev, struct saa7146_fh *fh)
+static void vbi_open(struct saa7146_dev *dev, struct file *file)
{
+ struct saa7146_fh *fh = (struct saa7146_fh *)file->private_data;
+
u32 arbtr_ctrl = saa7146_read(dev, PCI_BT_V1);
int ret = 0;
@@ -401,7 +404,7 @@ static void vbi_open(struct saa7146_dev *dev, struct saa7146_fh *fh)
init_timer(&fh->vbi_read_timeout);
fh->vbi_read_timeout.function = vbi_read_timeout;
- fh->vbi_read_timeout.data = (unsigned long)fh;
+ fh->vbi_read_timeout.data = (unsigned long)file;
/* initialize the brs */
if ( 0 != (SAA7146_USE_PORT_B_FOR_VBI & dev->ext_vv_data->flags)) {
@@ -419,14 +422,14 @@ static void vbi_open(struct saa7146_dev *dev, struct saa7146_fh *fh)
saa7146_write(dev, MC2, (MASK_08|MASK_24));
}
-static void vbi_close(struct saa7146_dev *dev, struct saa7146_fh *fh, struct file *file)
+static void vbi_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;
DEB_VBI(("dev:%p, fh:%p\n",dev,fh));
if( fh == vv->vbi_streaming ) {
- vbi_stop(fh);
+ vbi_stop(fh, file);
}
}
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,
};
diff --git a/linux/include/media/saa7146_vv.h b/linux/include/media/saa7146_vv.h
index 61a3f32dc..5043be6ee 100644
--- a/linux/include/media/saa7146_vv.h
+++ b/linux/include/media/saa7146_vv.h
@@ -171,12 +171,10 @@ struct saa7146_ext_vv
struct saa7146_use_ops {
void (*init)(struct saa7146_dev *, struct saa7146_vv *);
- void(*open)(struct saa7146_dev *, struct saa7146_fh *);
- void (*release)(struct saa7146_dev *, struct saa7146_fh *,struct file *);
+ void(*open)(struct saa7146_dev *, struct file *);
+ void (*release)(struct saa7146_dev *, struct file *);
void (*irq_done)(struct saa7146_dev *, unsigned long status);
ssize_t (*read)(struct file *, char *, size_t, loff_t *);
- int (*capture_begin)(struct saa7146_fh *);
- int (*capture_end)(struct saa7146_fh *);
};
/* from saa7146_fops.c */