From 368fcb52643105d80c4705afa557647c8f7114c5 Mon Sep 17 00:00:00 2001 From: Daniel De Graaf Date: Thu, 21 Mar 2013 16:11:20 -0400 Subject: mini-os/tpmback: set up callbacks before enumeration The open/close callbacks in tpmback cannot be properly initalized in order to catch the initial enumeration events because init_tpmback clears the callbacks and then asynchronously starts the enumeration of existing tpmback devices. Fix this by passing the callbacks to init_tpmback so they can be installed before enumeration. This also removes the unused callbacks for suspend and resume. Signed-off-by: Daniel De Graaf --- extras/mini-os/include/tpmback.h | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'extras/mini-os/include') diff --git a/extras/mini-os/include/tpmback.h b/extras/mini-os/include/tpmback.h index ec9eda4b57..3c11c347a3 100644 --- a/extras/mini-os/include/tpmback.h +++ b/extras/mini-os/include/tpmback.h @@ -56,7 +56,7 @@ struct tpmcmd { typedef struct tpmcmd tpmcmd_t; /* Initialize the tpm backend driver */ -void init_tpmback(void); +void init_tpmback(void (*open_cb)(domid_t, unsigned int), void (*close_cb)(domid_t, unsigned int)); /* Shutdown tpm backend driver */ void shutdown_tpmback(void); @@ -94,14 +94,4 @@ int tpmback_num_frontends(void); * The return value is internally allocated, so don't free it */ unsigned char* tpmback_get_uuid(domid_t domid, unsigned int handle); -/* Specify a function to call when a new tpm device connects */ -void tpmback_set_open_callback(void (*cb)(domid_t, unsigned int)); - -/* Specify a function to call when a tpm device disconnects */ -void tpmback_set_close_callback(void (*cb)(domid_t, unsigned int)); - -//Not Implemented -void tpmback_set_suspend_callback(void (*cb)(domid_t, unsigned int)); -void tpmback_set_resume_callback(void (*cb)(domid_t, unsigned int)); - #endif -- cgit v1.2.3