summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/saa7134/saa7134-vbi.c
diff options
context:
space:
mode:
authorGerd Knorr <devnull@localhost>2004-11-07 13:17:14 +0000
committerGerd Knorr <devnull@localhost>2004-11-07 13:17:14 +0000
commit1a6399de3074ab4dc6bdad694bbd8b47d486d6b2 (patch)
tree22189018b0aab90670437f90da90bbbe57789b60 /linux/drivers/media/video/saa7134/saa7134-vbi.c
parent78f377b0ee18b3889b2a2bfcee75ab9786e80a35 (diff)
downloadmediapointer-dvb-s2-1a6399de3074ab4dc6bdad694bbd8b47d486d6b2.tar.gz
mediapointer-dvb-s2-1a6399de3074ab4dc6bdad694bbd8b47d486d6b2.tar.bz2
- yet another video-buf interface change + fixups.
- move more modules to new-style insmod options.
Diffstat (limited to 'linux/drivers/media/video/saa7134/saa7134-vbi.c')
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-vbi.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/linux/drivers/media/video/saa7134/saa7134-vbi.c b/linux/drivers/media/video/saa7134/saa7134-vbi.c
index ee4806d54..5707e9021 100644
--- a/linux/drivers/media/video/saa7134/saa7134-vbi.c
+++ b/linux/drivers/media/video/saa7134/saa7134-vbi.c
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134-vbi.c,v 1.4 2004/10/13 10:39:00 kraxel Exp $
+ * $Id: saa7134-vbi.c,v 1.5 2004/11/07 13:17:15 kraxel Exp $
*
* device driver for philips saa7134 based TV cards
* video4linux video interface
@@ -33,11 +33,11 @@
/* ------------------------------------------------------------------ */
static unsigned int vbi_debug = 0;
-MODULE_PARM(vbi_debug,"i");
+module_param(vbi_debug, int, 0644);
MODULE_PARM_DESC(vbi_debug,"enable debug messages [vbi]");
static unsigned int vbibufs = 4;
-MODULE_PARM(vbibufs,"i");
+module_param(vbibufs, int, 0444);
MODULE_PARM_DESC(vbibufs,"number of vbi buffers, range 2-32");
#define dprintk(fmt, arg...) if (vbi_debug) \
@@ -115,12 +115,13 @@ static int buffer_activate(struct saa7134_dev *dev,
return 0;
}
-static int buffer_prepare(void *priv, struct videobuf_buffer *vb,
+static int buffer_prepare(struct videobuf_queue *q,
+ struct videobuf_buffer *vb,
enum v4l2_field field)
{
- struct saa7134_fh *fh = priv;
+ struct saa7134_fh *fh = q->priv_data;
struct saa7134_dev *dev = fh->dev;
- struct saa7134_buf *buf = (struct saa7134_buf *)vb;
+ struct saa7134_buf *buf = container_of(vb,struct saa7134_buf,vb);
struct saa7134_tvnorm *norm = dev->tvnorm;
unsigned int lines, llength, size;
int err;
@@ -169,9 +170,9 @@ static int buffer_prepare(void *priv, struct videobuf_buffer *vb,
}
static int
-buffer_setup(void *priv, unsigned int *count, unsigned int *size)
+buffer_setup(struct videobuf_queue *q, unsigned int *count, unsigned int *size)
{
- struct saa7134_fh *fh = priv;
+ struct saa7134_fh *fh = q->priv_data;
struct saa7134_dev *dev = fh->dev;
int llength,lines;
@@ -190,20 +191,20 @@ buffer_setup(void *priv, unsigned int *count, unsigned int *size)
return 0;
}
-static void buffer_queue(void *priv, struct videobuf_buffer *vb)
+static void buffer_queue(struct videobuf_queue *q, struct videobuf_buffer *vb)
{
- struct saa7134_fh *fh = priv;
+ struct saa7134_fh *fh = q->priv_data;
struct saa7134_dev *dev = fh->dev;
- struct saa7134_buf *buf = (struct saa7134_buf *)vb;
+ struct saa7134_buf *buf = container_of(vb,struct saa7134_buf,vb);
saa7134_buffer_queue(dev,&dev->vbi_q,buf);
}
-static void buffer_release(void *priv, struct videobuf_buffer *vb)
+static void buffer_release(struct videobuf_queue *q, struct videobuf_buffer *vb)
{
- struct saa7134_fh *fh = priv;
+ struct saa7134_fh *fh = q->priv_data;
struct saa7134_dev *dev = fh->dev;
- struct saa7134_buf *buf = (struct saa7134_buf *)vb;
+ struct saa7134_buf *buf = container_of(vb,struct saa7134_buf,vb);
saa7134_dma_free(dev,buf);
}