From 8ee8836220158e91941b7d508b5179bd49c5944d Mon Sep 17 00:00:00 2001 From: Michael Hunold Date: Mon, 15 Dec 2003 20:54:10 +0000 Subject: - fix compilation - more video/vbi open/release fixes --- linux/drivers/media/common/saa7146_vbi.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'linux/drivers/media/common/saa7146_vbi.c') 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); } } -- cgit v1.2.3