]> xenbits.xensource.com Git - people/liuw/stubdom.git/commitdiff
mini-os/tpmback: set up callbacks before enumeration
authorDaniel De Graaf <dgdegra@tycho.nsa.gov>
Thu, 21 Mar 2013 20:11:20 +0000 (16:11 -0400)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 12 Apr 2013 13:28:17 +0000 (14:28 +0100)
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>
vtpm/vtpm.c
vtpmmgr/init.c

index 71aef78d17c6bb84831cb1165d8a670c64aa7fe1..3362ea816bf2505979a7c4f1a1002ae269824c83 100644 (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;
index a158020f1daeb7192d095a037653ad5f853bd548..00dd9f3516aa0d599084025e38fa358f9cf42073 100644 (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) {