aboutsummaryrefslogtreecommitdiffstats
path: root/extras/mini-os/include
diff options
context:
space:
mode:
authorDaniel De Graaf <dgdegra@tycho.nsa.gov>2013-03-21 16:11:20 -0400
committerIan Campbell <ian.campbell@citrix.com>2013-04-12 14:28:17 +0100
commit368fcb52643105d80c4705afa557647c8f7114c5 (patch)
treed8b7fc9260c92ff9297ebc6303e01ac5a929ee28 /extras/mini-os/include
parente66cb3294f3aa815ae6741b7030dfeb2ea801284 (diff)
downloadxen-368fcb52643105d80c4705afa557647c8f7114c5.tar.gz
xen-368fcb52643105d80c4705afa557647c8f7114c5.tar.bz2
xen-368fcb52643105d80c4705afa557647c8f7114c5.zip
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 <dgdegra@tycho.nsa.gov>
Diffstat (limited to 'extras/mini-os/include')
-rw-r--r--extras/mini-os/include/tpmback.h12
1 files changed, 1 insertions, 11 deletions
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