]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/dvb/dvb-core/dmxdev.c
V4L/DVB (7571): mt312: Cleanup buffer variables of read/write functions
[linux-2.6-omap-h63xx.git] / drivers / media / dvb / dvb-core / dmxdev.c
index 275df65fde992680b82631f7ee1ca98750a6d256..3415a3bb363c4db2c60497f1219f149d6f1f13f1 100644 (file)
@@ -24,7 +24,6 @@
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
 #include <linux/module.h>
-#include <linux/moduleparam.h>
 #include <linux/poll.h>
 #include <linux/ioctl.h>
 #include <linux/wait.h>
@@ -97,7 +96,7 @@ static ssize_t dvb_dmxdev_buffer_read(struct dvb_ringbuffer *src,
                if (avail > todo)
                        avail = todo;
 
-               ret = dvb_ringbuffer_read(src, buf, avail, 1);
+               ret = dvb_ringbuffer_read(src, (u8 *)buf, avail, 1);
                if (ret < 0)
                        break;
 
@@ -127,7 +126,7 @@ static int dvb_dvr_open(struct inode *inode, struct file *file)
        struct dmxdev *dmxdev = dvbdev->priv;
        struct dmx_frontend *front;
 
-       dprintk("function : %s\n", __FUNCTION__);
+       dprintk("function : %s\n", __func__);
 
        if (mutex_lock_interruptible(&dmxdev->mutex))
                return -ERESTARTSYS;
@@ -375,7 +374,8 @@ static int dvb_dmxdev_ts_callback(const u8 *buffer1, size_t buffer1_len,
                return 0;
        }
 
-       if (dmxdevfilter->params.pes.output == DMX_OUT_TAP)
+       if (dmxdevfilter->params.pes.output == DMX_OUT_TAP
+           || dmxdevfilter->params.pes.output == DMX_OUT_TSDEMUX_TAP)
                buffer = &dmxdevfilter->buffer;
        else
                buffer = &dmxdevfilter->dev->dvr_buffer;
@@ -551,7 +551,7 @@ static int dvb_dmxdev_filter_start(struct dmxdev_filter *filter)
                                                                   dvb_dmxdev_section_callback);
                        if (ret < 0) {
                                printk("DVB (%s): could not alloc feed\n",
-                                      __FUNCTION__);
+                                      __func__);
                                return ret;
                        }
 
@@ -559,7 +559,7 @@ static int dvb_dmxdev_filter_start(struct dmxdev_filter *filter)
                                              (para->flags & DMX_CHECK_CRC) ? 1 : 0);
                        if (ret < 0) {
                                printk("DVB (%s): could not set feed\n",
-                                      __FUNCTION__);
+                                      __func__);
                                dvb_dmxdev_feed_restart(filter);
                                return ret;
                        }
@@ -621,9 +621,10 @@ static int dvb_dmxdev_filter_start(struct dmxdev_filter *filter)
 
                if (otype == DMX_OUT_TS_TAP)
                        ts_type |= TS_PACKET;
-
-               if (otype == DMX_OUT_TAP)
-                       ts_type |= TS_PAYLOAD_ONLY | TS_PACKET;
+               else if (otype == DMX_OUT_TSDEMUX_TAP)
+                       ts_type |= TS_PACKET | TS_DEMUX;
+               else if (otype == DMX_OUT_TAP)
+                       ts_type |= TS_PACKET | TS_DEMUX | TS_PAYLOAD_ONLY;
 
                ret = dmxdev->demux->allocate_ts_feed(dmxdev->demux,
                                                      tsfeed,
@@ -733,7 +734,7 @@ static int dvb_dmxdev_filter_set(struct dmxdev *dmxdev,
                                 struct dmxdev_filter *dmxdevfilter,
                                 struct dmx_sct_filter_params *params)
 {
-       dprintk("function : %s\n", __FUNCTION__);
+       dprintk("function : %s\n", __func__);
 
        dvb_dmxdev_filter_stop(dmxdevfilter);
 
@@ -1039,7 +1040,7 @@ static unsigned int dvb_dvr_poll(struct file *file, poll_table *wait)
        struct dmxdev *dmxdev = dvbdev->priv;
        unsigned int mask = 0;
 
-       dprintk("function : %s\n", __FUNCTION__);
+       dprintk("function : %s\n", __func__);
 
        poll_wait(file, &dmxdev->dvr_buffer.queue, wait);