summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.h
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2008-02-09 22:59:08 -0600
committerMike Isely <isely@pobox.com>2008-02-09 22:59:08 -0600
commitdef54dfafa784d5829a95ebe5150f9bc8c0bba6e (patch)
tree2461a4c6938068d5517020dbbc3a6242c57c0c8d /linux/drivers/media/video/pvrusb2/pvrusb2-hdw.h
parent5d7dcf24bf2c8edcf69c20cc70ba2e5278a5e553 (diff)
downloadmediapointer-dvb-s2-def54dfafa784d5829a95ebe5150f9bc8c0bba6e.tar.gz
mediapointer-dvb-s2-def54dfafa784d5829a95ebe5150f9bc8c0bba6e.tar.bz2
pvrusb2: Close potential race condition during initialization
From: Mike Isely <isely@pobox.com> 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>
Diffstat (limited to 'linux/drivers/media/video/pvrusb2/pvrusb2-hdw.h')
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-hdw.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.h b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.h
index 8c0abb4e4..d2f8fa9d3 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.h
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.h
@@ -102,6 +102,12 @@ 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);
+
#if 0
/* Get pointer to structure given unit number */
struct pvr2_hdw *pvr2_hdw_find(int unit_number);
@@ -110,11 +116,6 @@ struct pvr2_hdw *pvr2_hdw_find(int unit_number);
/* 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 *);