diff options
author | Mike Isely <isely@pobox.com> | 2008-04-22 13:45:44 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-24 13:07:48 -0400 |
commit | c4a8828ddbf5fb445d2679ab006d5743540fc41a (patch) | |
tree | 2b17fa77218b812f164f1d897dfe1015d98d2510 /drivers/media/video/pvrusb2/pvrusb2-context.c | |
parent | ee9ca4b24f03b4da04cae1a24ea445ceb8a1f3d2 (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.c | 7 |
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 2a6726e403f0..953784c08abb 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( | |||
75 | mp = NULL; | 75 | mp = NULL; |
76 | goto done; | 76 | goto done; |
77 | } | 77 | } |
78 | pvr2_hdw_set_state_callback(mp->hdw, | 78 | pvr2_hdw_initialize(mp->hdw, |
79 | (void (*)(void *))pvr2_context_state_check, | 79 | (void (*)(void *))pvr2_context_state_check, |
80 | mp); | 80 | mp); |
81 | pvr2_context_state_check(mp); | ||
82 | done: | 81 | done: |
83 | return mp; | 82 | return mp; |
84 | } | 83 | } |