提交 3b81fec4 编写于 作者: P Peter Beutner 提交者: Mauro Carvalho Chehab

V4L/DVB (3386): Dvb-core: remove dead code

The field "dvr" in struct dmxdev is competely unused. Remove
it and code which allocates, initializes and frees it.
Signed-off-by: NPeter Beutner <p.beutner@gmx.net>
Signed-off-by: NJohannes Stezenbach <js@linuxtv.org>
Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
上级 1be11e36
...@@ -160,13 +160,6 @@ static struct dmx_frontend * get_fe(struct dmx_demux *demux, int type) ...@@ -160,13 +160,6 @@ static struct dmx_frontend * get_fe(struct dmx_demux *demux, int type)
return NULL; return NULL;
} }
static inline void dvb_dmxdev_dvr_state_set(struct dmxdev_dvr *dmxdevdvr, int state)
{
spin_lock_irq(&dmxdevdvr->dev->lock);
dmxdevdvr->state=state;
spin_unlock_irq(&dmxdevdvr->dev->lock);
}
static int dvb_dvr_open(struct inode *inode, struct file *file) static int dvb_dvr_open(struct inode *inode, struct file *file)
{ {
struct dvb_device *dvbdev = file->private_data; struct dvb_device *dvbdev = file->private_data;
...@@ -1106,22 +1099,12 @@ dvb_dmxdev_init(struct dmxdev *dmxdev, struct dvb_adapter *dvb_adapter) ...@@ -1106,22 +1099,12 @@ dvb_dmxdev_init(struct dmxdev *dmxdev, struct dvb_adapter *dvb_adapter)
if (!dmxdev->filter) if (!dmxdev->filter)
return -ENOMEM; return -ENOMEM;
dmxdev->dvr = vmalloc(dmxdev->filternum*sizeof(struct dmxdev_dvr));
if (!dmxdev->dvr) {
vfree(dmxdev->filter);
dmxdev->filter = NULL;
return -ENOMEM;
}
mutex_init(&dmxdev->mutex); mutex_init(&dmxdev->mutex);
spin_lock_init(&dmxdev->lock); spin_lock_init(&dmxdev->lock);
for (i=0; i<dmxdev->filternum; i++) { for (i=0; i<dmxdev->filternum; i++) {
dmxdev->filter[i].dev=dmxdev; dmxdev->filter[i].dev=dmxdev;
dmxdev->filter[i].buffer.data=NULL; dmxdev->filter[i].buffer.data=NULL;
dvb_dmxdev_filter_state_set(&dmxdev->filter[i], DMXDEV_STATE_FREE); dvb_dmxdev_filter_state_set(&dmxdev->filter[i], DMXDEV_STATE_FREE);
dmxdev->dvr[i].dev=dmxdev;
dmxdev->dvr[i].buffer.data=NULL;
dvb_dmxdev_dvr_state_set(&dmxdev->dvr[i], DMXDEV_STATE_FREE);
} }
dvb_register_device(dvb_adapter, &dmxdev->dvbdev, &dvbdev_demux, dmxdev, DVB_DEVICE_DEMUX); dvb_register_device(dvb_adapter, &dmxdev->dvbdev, &dvbdev_demux, dmxdev, DVB_DEVICE_DEMUX);
...@@ -1141,8 +1124,6 @@ dvb_dmxdev_release(struct dmxdev *dmxdev) ...@@ -1141,8 +1124,6 @@ dvb_dmxdev_release(struct dmxdev *dmxdev)
vfree(dmxdev->filter); vfree(dmxdev->filter);
dmxdev->filter=NULL; dmxdev->filter=NULL;
vfree(dmxdev->dvr);
dmxdev->dvr=NULL;
dmxdev->demux->close(dmxdev->demux); dmxdev->demux->close(dmxdev->demux);
} }
EXPORT_SYMBOL(dvb_dmxdev_release); EXPORT_SYMBOL(dvb_dmxdev_release);
...@@ -94,19 +94,11 @@ struct dmxdev_filter { ...@@ -94,19 +94,11 @@ struct dmxdev_filter {
}; };
struct dmxdev_dvr {
int state;
struct dmxdev *dev;
struct dmxdev_buffer buffer;
};
struct dmxdev { struct dmxdev {
struct dvb_device *dvbdev; struct dvb_device *dvbdev;
struct dvb_device *dvr_dvbdev; struct dvb_device *dvr_dvbdev;
struct dmxdev_filter *filter; struct dmxdev_filter *filter;
struct dmxdev_dvr *dvr;
struct dmx_demux *demux; struct dmx_demux *demux;
int filternum; int filternum;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册