@@ -755,13 +755,11 @@ static int dvb_demux_open(struct inode *inode, struct file *file)
}
dmxdevfilter = &dmxdev->filter[i];
- mutex_init(&dmxdevfilter->mutex);
file->private_data = dmxdevfilter;
dvb_ringbuffer_init(&dmxdevfilter->buffer, NULL, 8192);
dmxdevfilter->type = DMXDEV_TYPE_NONE;
dvb_dmxdev_filter_state_set(dmxdevfilter, DMXDEV_STATE_ALLOCATED);
- INIT_LIST_HEAD(&dmxdevfilter->feed.ts);
init_timer(&dmxdevfilter->timer);
dvbdev->users++;
@@ -1239,6 +1237,8 @@ int dvb_dmxdev_init(struct dmxdev *dmxdev, struct dvb_adapter *dvb_adapter)
dmxdev->filter[i].buffer.data = NULL;
dvb_dmxdev_filter_state_set(&dmxdev->filter[i],
DMXDEV_STATE_FREE);
+ mutex_init(&dmxdev->filter[i].mutex);
+ INIT_LIST_HEAD(&dmxdev->filter[i].feed.ts);
}
dvb_register_device(dvb_adapter, &dmxdev->dvbdev, &dvbdev_demux, dmxdev,