aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pvrusb2/pvrusb2-hdw.h
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2008-04-22 13:45:44 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-24 13:07:48 -0400
commitc4a8828ddbf5fb445d2679ab006d5743540fc41a (patch)
tree2b17fa77218b812f164f1d897dfe1015d98d2510 /drivers/media/video/pvrusb2/pvrusb2-hdw.h
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-hdw.h')
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-hdw.h11
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;
101struct pvr2_hdw *pvr2_hdw_create(struct usb_interface *intf, 101struct pvr2_hdw *pvr2_hdw_create(struct usb_interface *intf,
102 const struct usb_device_id *devid); 102 const struct usb_device_id *devid);
103 103
104/* Perform second stage initialization, passing in a notification callback
105 for when the master state changes. */
106void pvr2_hdw_initialize(struct pvr2_hdw *,
107 void (*callback_func)(void *),
108 void *callback_data);
109
104/* Destroy hardware interaction structure */ 110/* Destroy hardware interaction structure */
105void pvr2_hdw_destroy(struct pvr2_hdw *); 111void pvr2_hdw_destroy(struct pvr2_hdw *);
106 112
107/* Register a function to be called whenever the master state changes. */
108void pvr2_hdw_set_state_callback(struct pvr2_hdw *,
109 void (*callback_func)(void *),
110 void *callback_data);
111
112/* Return true if in the ready (normal) state */ 113/* Return true if in the ready (normal) state */
113int pvr2_hdw_dev_ok(struct pvr2_hdw *); 114int pvr2_hdw_dev_ok(struct pvr2_hdw *);
114 115