diff options
author | Mike Isely <isely@pobox.com> | 2008-04-22 19:45:44 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-24 19:07:48 +0200 |
commit | c4a8828ddbf5fb445d2679ab006d5743540fc41a (patch) | |
tree | 2b17fa77218b812f164f1d897dfe1015d98d2510 /drivers/media/video/pvrusb2/pvrusb2-hdw.h | |
parent | V4L/DVB (7318): pvrusb2: Remove dead code (diff) | |
download | linux-c4a8828ddbf5fb445d2679ab006d5743540fc41a.tar.xz linux-c4a8828ddbf5fb445d2679ab006d5743540fc41a.zip |
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-hdw.h')
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-hdw.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.h b/drivers/media/video/pvrusb2/pvrusb2-hdw.h index 57e1ff491497..597ee5033149 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw.h +++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.h @@ -101,14 +101,15 @@ struct pvr2_hdw; struct pvr2_hdw *pvr2_hdw_create(struct usb_interface *intf, const struct usb_device_id *devid); +/* Perform second stage initialization, passing in a notification callback + for when the master state changes. */ +void pvr2_hdw_initialize(struct pvr2_hdw *, + void (*callback_func)(void *), + void *callback_data); + /* Destroy hardware interaction structure */ void pvr2_hdw_destroy(struct pvr2_hdw *); -/* Register a function to be called whenever the master state changes. */ -void pvr2_hdw_set_state_callback(struct pvr2_hdw *, - void (*callback_func)(void *), - void *callback_data); - /* Return true if in the ready (normal) state */ int pvr2_hdw_dev_ok(struct pvr2_hdw *); |