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>
This commit is contained in:
Daniel De Graaf authored and Ian Campbell committed 2013-04-12 14:28:17 +01:00
1 parent e66cb3294f
commit 368fcb5264
4 files changed
+6 -41

No files matched your search

+1 -1
View File
@@ -367,7 +367,7 @@ int main(int argc, char **argv)
}
/* Initialize devices */
init_tpmback();
init_tpmback(NULL, NULL);
if((tpmfront_dev = init_tpmfront(NULL)) == NULL) {
error("Unable to initialize tpmfront device");
goto abort_posttpmfront;
+1 -1
View File
@@ -462,7 +462,7 @@ TPM_RESULT vtpmmgr_init(int argc, char** argv) {
}
//Setup tpmback device
init_tpmback();
init_tpmback(NULL, NULL);
//Setup tpm access
switch(opts.tpmdriver) {
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.