summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pvrusb2/pvrusb2-context.c
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2008-04-22 14:45:44 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-24 14:07:48 -0300
commitc4a8828ddbf5fb445d2679ab006d5743540fc41a (patch)
tree2b17fa77218b812f164f1d897dfe1015d98d2510 /drivers/media/video/pvrusb2/pvrusb2-context.c
parentee9ca4b24f03b4da04cae1a24ea445ceb8a1f3d2 (diff)
V4L/DVB (7319): pvrusb2: Close potential race condition during initialization
There is a callback that is issued to into pvr2_context from pvr2_hdw after initialization is done. There was a probability that this callback could get missed. Fixed. Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-context.c')
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-context.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-context.c b/drivers/media/video/pvrusb2/pvrusb2-context.c
index 2a6726e403f..953784c08ab 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-context.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-context.c
@@ -75,10 +75,9 @@ struct pvr2_context *pvr2_context_create(
mp = NULL;
goto done;
}
- pvr2_hdw_set_state_callback(mp->hdw,
- (void (*)(void *))pvr2_context_state_check,
- mp);
- pvr2_context_state_check(mp);
+ pvr2_hdw_initialize(mp->hdw,
+ (void (*)(void *))pvr2_context_state_check,
+ mp);
done:
return mp;
}