aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/videobuf-dvb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/videobuf-dvb.c')
-rw-r--r--drivers/media/video/videobuf-dvb.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/media/video/videobuf-dvb.c b/drivers/media/video/videobuf-dvb.c
index b73aba65d21d..6e4d73ec6855 100644
--- a/drivers/media/video/videobuf-dvb.c
+++ b/drivers/media/video/videobuf-dvb.c
@@ -20,9 +20,10 @@
20#include <linux/fs.h> 20#include <linux/fs.h>
21#include <linux/kthread.h> 21#include <linux/kthread.h>
22#include <linux/file.h> 22#include <linux/file.h>
23
23#include <linux/freezer.h> 24#include <linux/freezer.h>
24 25
25#include <media/videobuf-dma-sg.h> 26#include <media/videobuf-core.h>
26#include <media/videobuf-dvb.h> 27#include <media/videobuf-dvb.h>
27 28
28/* ------------------------------------------------------------------ */ 29/* ------------------------------------------------------------------ */
@@ -30,7 +31,7 @@
30MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]"); 31MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]");
31MODULE_LICENSE("GPL"); 32MODULE_LICENSE("GPL");
32 33
33static unsigned int debug = 0; 34static unsigned int debug;
34module_param(debug, int, 0644); 35module_param(debug, int, 0644);
35MODULE_PARM_DESC(debug,"enable debug messages"); 36MODULE_PARM_DESC(debug,"enable debug messages");
36 37
@@ -45,7 +46,7 @@ static int videobuf_dvb_thread(void *data)
45 struct videobuf_buffer *buf; 46 struct videobuf_buffer *buf;
46 unsigned long flags; 47 unsigned long flags;
47 int err; 48 int err;
48 struct videobuf_dmabuf *dma; 49 void *outp;
49 50
50 dprintk("dvb thread started\n"); 51 dprintk("dvb thread started\n");
51 set_freezable(); 52 set_freezable();
@@ -66,9 +67,10 @@ static int videobuf_dvb_thread(void *data)
66 try_to_freeze(); 67 try_to_freeze();
67 68
68 /* feed buffer data to demux */ 69 /* feed buffer data to demux */
69 dma=videobuf_to_dma(buf); 70 outp = videobuf_queue_to_vmalloc (&dvb->dvbq, buf);
71
70 if (buf->state == VIDEOBUF_DONE) 72 if (buf->state == VIDEOBUF_DONE)
71 dvb_dmx_swfilter(&dvb->demux, dma->vmalloc, 73 dvb_dmx_swfilter(&dvb->demux, outp,
72 buf->size); 74 buf->size);
73 75
74 /* requeue buffer */ 76 /* requeue buffer */
@@ -138,14 +140,16 @@ static int videobuf_dvb_stop_feed(struct dvb_demux_feed *feed)
138int videobuf_dvb_register(struct videobuf_dvb *dvb, 140int videobuf_dvb_register(struct videobuf_dvb *dvb,
139 struct module *module, 141 struct module *module,
140 void *adapter_priv, 142 void *adapter_priv,
141 struct device *device) 143 struct device *device,
144 short *adapter_nr)
142{ 145{
143 int result; 146 int result;
144 147
145 mutex_init(&dvb->lock); 148 mutex_init(&dvb->lock);
146 149
147 /* register adapter */ 150 /* register adapter */
148 result = dvb_register_adapter(&dvb->adapter, dvb->name, module, device); 151 result = dvb_register_adapter(&dvb->adapter, dvb->name, module, device,
152 adapter_nr);
149 if (result < 0) { 153 if (result < 0) {
150 printk(KERN_WARNING "%s: dvb_register_adapter failed (errno = %d)\n", 154 printk(KERN_WARNING "%s: dvb_register_adapter failed (errno = %d)\n",
151 dvb->name, result); 155 dvb->name, result);