summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/saa7134/saa7134-ts.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video/saa7134/saa7134-ts.c')
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-ts.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/linux/drivers/media/video/saa7134/saa7134-ts.c b/linux/drivers/media/video/saa7134/saa7134-ts.c
index 3bcb51bf3..ed73f71a4 100644
--- a/linux/drivers/media/video/saa7134/saa7134-ts.c
+++ b/linux/drivers/media/video/saa7134/saa7134-ts.c
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134-ts.c,v 1.11 2004/10/19 16:02:05 kraxel Exp $
+ * $Id: saa7134-ts.c,v 1.12 2004/11/07 13:17:15 kraxel Exp $
*
* device driver for philips saa7134 based TV cards
* video4linux video interface
@@ -34,7 +34,7 @@
/* ------------------------------------------------------------------ */
static unsigned int ts_debug = 0;
-MODULE_PARM(ts_debug,"i");
+module_param(ts_debug, int, 0644);
MODULE_PARM_DESC(ts_debug,"enable debug messages [ts]");
#define dprintk(fmt, arg...) if (ts_debug) \
@@ -78,11 +78,11 @@ 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_dev *dev = priv;
- struct saa7134_buf *buf = (struct saa7134_buf *)vb;
+ struct saa7134_dev *dev = q->priv_data;
+ struct saa7134_buf *buf = container_of(vb,struct saa7134_buf,vb);
unsigned int lines, llength, size;
int err;
@@ -126,9 +126,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_dev *dev = priv;
+ struct saa7134_dev *dev = q->priv_data;
*size = TS_PACKET_SIZE * dev->ts.nr_packets;
if (0 == *count)
@@ -137,18 +137,18 @@ 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_dev *dev = priv;
- struct saa7134_buf *buf = (struct saa7134_buf *)vb;
+ struct saa7134_dev *dev = q->priv_data;
+ struct saa7134_buf *buf = container_of(vb,struct saa7134_buf,vb);
saa7134_buffer_queue(dev,&dev->ts_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_dev *dev = priv;
- struct saa7134_buf *buf = (struct saa7134_buf *)vb;
+ struct saa7134_dev *dev = q->priv_data;
+ struct saa7134_buf *buf = container_of(vb,struct saa7134_buf,vb);
saa7134_dma_free(dev,buf);
}
@@ -165,11 +165,11 @@ EXPORT_SYMBOL_GPL(saa7134_ts_qops);
/* exported stuff */
static unsigned int tsbufs = 4;
-MODULE_PARM(tsbufs,"i");
+module_param(tsbufs, int, 0444);
MODULE_PARM_DESC(tsbufs,"number of ts buffers, range 2-32");
static unsigned int ts_nr_packets = 30;
-MODULE_PARM(ts_nr_packets,"i");
+module_param(ts_nr_packets, int, 0444);
MODULE_PARM_DESC(ts_nr_packets,"size of a ts buffers (in ts packets)");
int saa7134_ts_init1(struct saa7134_dev *dev)