aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pvrusb2/pvrusb2-context.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-context.c')
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-context.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-context.c b/drivers/media/video/pvrusb2/pvrusb2-context.c
index f129f316d20e..cf129746205d 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-context.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-context.c
@@ -45,16 +45,21 @@ static void pvr2_context_trigger_poll(struct pvr2_context *mp)
45} 45}
46 46
47 47
48static void pvr2_context_poll(struct pvr2_context *mp) 48static void pvr2_context_poll(struct work_struct *work)
49{ 49{
50 struct pvr2_context *mp =
51 container_of(work, struct pvr2_context, workpoll);
50 pvr2_context_enter(mp); do { 52 pvr2_context_enter(mp); do {
51 pvr2_hdw_poll(mp->hdw); 53 pvr2_hdw_poll(mp->hdw);
52 } while (0); pvr2_context_exit(mp); 54 } while (0); pvr2_context_exit(mp);
53} 55}
54 56
55 57
56static void pvr2_context_setup(struct pvr2_context *mp) 58static void pvr2_context_setup(struct work_struct *work)
57{ 59{
60 struct pvr2_context *mp =
61 container_of(work, struct pvr2_context, workinit);
62
58 pvr2_context_enter(mp); do { 63 pvr2_context_enter(mp); do {
59 if (!pvr2_hdw_dev_ok(mp->hdw)) break; 64 if (!pvr2_hdw_dev_ok(mp->hdw)) break;
60 pvr2_hdw_setup(mp->hdw); 65 pvr2_hdw_setup(mp->hdw);
@@ -92,8 +97,8 @@ struct pvr2_context *pvr2_context_create(
92 } 97 }
93 98
94 mp->workqueue = create_singlethread_workqueue("pvrusb2"); 99 mp->workqueue = create_singlethread_workqueue("pvrusb2");
95 INIT_WORK(&mp->workinit,(void (*)(void*))pvr2_context_setup,mp); 100 INIT_WORK(&mp->workinit, pvr2_context_setup);
96 INIT_WORK(&mp->workpoll,(void (*)(void*))pvr2_context_poll,mp); 101 INIT_WORK(&mp->workpoll, pvr2_context_poll);
97 queue_work(mp->workqueue,&mp->workinit); 102 queue_work(mp->workqueue,&mp->workinit);
98 done: 103 done:
99 return mp; 104 return mp;