/* Functions that run in a work_queue work handling context  */
static void cx18_mdl_send_to_dvb(struct cx18_stream *s, struct cx18_mdl *mdl)
/* Functions that run in a work_queue work handling context  */
static void cx18_mdl_send_to_dvb(struct cx18_stream *s, struct cx18_mdl *mdl)
{
	struct cx18_buffer *buf;
	if (!s->dvb.enabled || mdl->bytesused == 0)
		return;
	if (list_is_singular(&mdl->buf_list)) {
		buf = list_first_entry(&mdl->buf_list, struct cx18_buffer,
				       list);
		if (buf->bytesused)
			dvb_dmx_swfilter(&s->dvb.demux,
					 buf->buf, buf->bytesused);
		return;
	}
	list_for_each_entry(buf, &mdl->buf_list, list) {
		if (buf->bytesused == 0)
			break;
		dvb_dmx_swfilter(&s->dvb.demux, buf->buf, buf->bytesused);
	}
}