if (cnt1 >= sizeof(hdw->name)) cnt1 = sizeof(hdw->name)-1;
hdw->name[cnt1] = 0;
- hdw->workqueue = create_singlethread_workqueue(hdw->name);
INIT_WORK(&hdw->workpoll,pvr2_hdw_worker_poll);
pvr2_trace(PVR2_TRACE_INIT,"Driver unit number is %d, name is %s",
del_timer_sync(&hdw->decoder_stabilization_timer);
del_timer_sync(&hdw->encoder_run_timer);
del_timer_sync(&hdw->encoder_wait_timer);
- if (hdw->workqueue) {
- flush_workqueue(hdw->workqueue);
- destroy_workqueue(hdw->workqueue);
- hdw->workqueue = NULL;
- }
+ flush_work(&hdw->workpoll);
usb_free_urb(hdw->ctl_read_urb);
usb_free_urb(hdw->ctl_write_urb);
kfree(hdw->ctl_read_buffer);
{
if (!hdw) return;
pvr2_trace(PVR2_TRACE_INIT,"pvr2_hdw_destroy: hdw=%p",hdw);
- if (hdw->workqueue) {
- flush_workqueue(hdw->workqueue);
- destroy_workqueue(hdw->workqueue);
- hdw->workqueue = NULL;
- }
+ flush_work(&hdw->workpoll);
del_timer_sync(&hdw->quiescent_timer);
del_timer_sync(&hdw->decoder_stabilization_timer);
del_timer_sync(&hdw->encoder_run_timer);
hdw->state_decoder_quiescent = !0;
trace_stbit("state_decoder_quiescent",hdw->state_decoder_quiescent);
hdw->state_stale = !0;
- queue_work(hdw->workqueue,&hdw->workpoll);
+ schedule_work(&hdw->workpoll);
}
hdw->state_decoder_ready = !0;
trace_stbit("state_decoder_ready", hdw->state_decoder_ready);
hdw->state_stale = !0;
- queue_work(hdw->workqueue, &hdw->workpoll);
+ schedule_work(&hdw->workpoll);
}
hdw->state_encoder_waitok = !0;
trace_stbit("state_encoder_waitok",hdw->state_encoder_waitok);
hdw->state_stale = !0;
- queue_work(hdw->workqueue,&hdw->workpoll);
+ schedule_work(&hdw->workpoll);
}
hdw->state_encoder_runok = !0;
trace_stbit("state_encoder_runok",hdw->state_encoder_runok);
hdw->state_stale = !0;
- queue_work(hdw->workqueue,&hdw->workpoll);
+ schedule_work(&hdw->workpoll);
}
}
if (hdw->state_stale) return;
hdw->state_stale = !0;
trace_stbit("state_stale",hdw->state_stale);
- queue_work(hdw->workqueue,&hdw->workpoll);
+ schedule_work(&hdw->workpoll);
}