Code: Alles auswählen
int
dvb_dmxdev_init(struct dmxdev *dmxdev, struct dvb_adapter *dvb_adapter)
{
...
sema_init(&dmxdev->mutex, 1);
spin_lock_init(&dmxdev->lock);
for (i=0; i<dmxdev->filternum; i++) {
dmxdev->filter[i].dev=dmxdev;
dmxdev->filter[i].buffer.data=0;
dvb_dmxdev_filter_state_set(&dmxdev->filter[i], DMXDEV_STATE_FREE);
dmxdev->dvr[i].dev=dmxdev;
dmxdev->dvr[i].buffer.data=0;
******************************************************
dvb_dmxdev_filter_state_set(&dmxdev->filter[i], DMXDEV_STATE_FREE);
******************************************************
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->dvr_dvbdev, &dvbdev_dvr, dmxdev, DVB_DEVICE_DVR);
dvb_dmxdev_buffer_init(&dmxdev->dvr_buffer);
return 0;
}
Houdini