diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2017-10-10 00:56:02 +0200 |
---|---|---|
committer | Stefan Berger <stefanb@linux.vnet.ibm.com> | 2017-10-19 11:42:33 -0400 |
commit | 05a699985c001927a50f8f276251f2af1e0c5b58 (patch) | |
tree | 6ceaf9311f014cf2be96a4194d98f593bc399184 /hw/tpm/tpm_emulator.c | |
parent | 698f5daa4a81984490612a6143b46f5da7392510 (diff) |
tpm: move recv_data_callback to TPM interface
Simplify the TPM backend setup, move callback to TPM interface.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Diffstat (limited to 'hw/tpm/tpm_emulator.c')
-rw-r--r-- | hw/tpm/tpm_emulator.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/tpm/tpm_emulator.c b/hw/tpm/tpm_emulator.c index 6500b86b41..9aaec8e3ef 100644 --- a/hw/tpm/tpm_emulator.c +++ b/hw/tpm/tpm_emulator.c @@ -176,6 +176,7 @@ static int tpm_emulator_set_locality(TPMEmulator *tpm_emu, uint8_t locty_number, static void tpm_emulator_handle_request(TPMBackend *tb, TPMBackendCmd *cmd) { TPMEmulator *tpm_emu = TPM_EMULATOR(tb); + TPMIfClass *tic = TPM_IF_GET_CLASS(tb->tpm_state); Error *err = NULL; DPRINTF("processing TPM command"); @@ -190,7 +191,7 @@ static void tpm_emulator_handle_request(TPMBackend *tb, TPMBackendCmd *cmd) goto error; } - tb->recv_data_callback(tb->tpm_state); + tic->request_completed(TPM_IF(tb->tpm_state)); return; error: |