aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r--drivers/media/dvb/dvb-core/dmxdev.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/media/dvb/dvb-core/dmxdev.c b/drivers/media/dvb/dvb-core/dmxdev.c
index 1624f4be5ea7..68050cd527cb 100644
--- a/drivers/media/dvb/dvb-core/dmxdev.c
+++ b/drivers/media/dvb/dvb-core/dmxdev.c
@@ -42,12 +42,6 @@ MODULE_PARM_DESC(debug, "Turn on/off debugging (default:off).");
42 42
43#define dprintk if (debug) printk 43#define dprintk if (debug) printk
44 44
45static inline struct dmxdev_filter *
46dvb_dmxdev_file_to_filter(struct file *file)
47{
48 return (struct dmxdev_filter *) file->private_data;
49}
50
51static inline void dvb_dmxdev_buffer_init(struct dmxdev_buffer *buffer) 45static inline void dvb_dmxdev_buffer_init(struct dmxdev_buffer *buffer)
52{ 46{
53 buffer->data=NULL; 47 buffer->data=NULL;
@@ -844,7 +838,7 @@ static ssize_t dvb_dmxdev_read_sec(struct dmxdev_filter *dfil,
844static ssize_t 838static ssize_t
845dvb_demux_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) 839dvb_demux_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
846{ 840{
847 struct dmxdev_filter *dmxdevfilter=dvb_dmxdev_file_to_filter(file); 841 struct dmxdev_filter *dmxdevfilter= file->private_data;
848 int ret=0; 842 int ret=0;
849 843
850 if (down_interruptible(&dmxdevfilter->mutex)) 844 if (down_interruptible(&dmxdevfilter->mutex))
@@ -865,7 +859,7 @@ dvb_demux_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
865static int dvb_demux_do_ioctl(struct inode *inode, struct file *file, 859static int dvb_demux_do_ioctl(struct inode *inode, struct file *file,
866 unsigned int cmd, void *parg) 860 unsigned int cmd, void *parg)
867{ 861{
868 struct dmxdev_filter *dmxdevfilter=dvb_dmxdev_file_to_filter(file); 862 struct dmxdev_filter *dmxdevfilter = file->private_data;
869 struct dmxdev *dmxdev=dmxdevfilter->dev; 863 struct dmxdev *dmxdev=dmxdevfilter->dev;
870 unsigned long arg=(unsigned long) parg; 864 unsigned long arg=(unsigned long) parg;
871 int ret=0; 865 int ret=0;
@@ -962,7 +956,7 @@ static int dvb_demux_ioctl(struct inode *inode, struct file *file,
962 956
963static unsigned int dvb_demux_poll (struct file *file, poll_table *wait) 957static unsigned int dvb_demux_poll (struct file *file, poll_table *wait)
964{ 958{
965 struct dmxdev_filter *dmxdevfilter = dvb_dmxdev_file_to_filter(file); 959 struct dmxdev_filter *dmxdevfilter = file->private_data;
966 unsigned int mask = 0; 960 unsigned int mask = 0;
967 961
968 if (!dmxdevfilter) 962 if (!dmxdevfilter)
@@ -987,7 +981,7 @@ static unsigned int dvb_demux_poll (struct file *file, poll_table *wait)
987 981
988static int dvb_demux_release(struct inode *inode, struct file *file) 982static int dvb_demux_release(struct inode *inode, struct file *file)
989{ 983{
990 struct dmxdev_filter *dmxdevfilter = dvb_dmxdev_file_to_filter(file); 984 struct dmxdev_filter *dmxdevfilter = file->private_data;
991 struct dmxdev *dmxdev = dmxdevfilter->dev; 985 struct dmxdev *dmxdev = dmxdevfilter->dev;
992 986
993 return dvb_dmxdev_filter_free(dmxdev, dmxdevfilter); 987 return dvb_dmxdev_filter_free(dmxdev, dmxdevfilter);
@@ -1111,7 +1105,6 @@ dvb_dmxdev_init(struct dmxdev *dmxdev, struct dvb_adapter *dvb_adapter)
1111 dvb_dmxdev_filter_state_set(&dmxdev->filter[i], DMXDEV_STATE_FREE); 1105 dvb_dmxdev_filter_state_set(&dmxdev->filter[i], DMXDEV_STATE_FREE);
1112 dmxdev->dvr[i].dev=dmxdev; 1106 dmxdev->dvr[i].dev=dmxdev;
1113 dmxdev->dvr[i].buffer.data=NULL; 1107 dmxdev->dvr[i].buffer.data=NULL;
1114 dvb_dmxdev_filter_state_set(&dmxdev->filter[i], DMXDEV_STATE_FREE);
1115 dvb_dmxdev_dvr_state_set(&dmxdev->dvr[i], DMXDEV_STATE_FREE); 1108 dvb_dmxdev_dvr_state_set(&dmxdev->dvr[i], DMXDEV_STATE_FREE);
1116 } 1109 }
1117 1110