aboutsummaryrefslogtreecommitdiff
path: root/hw/tpm
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2017-11-06 19:39:04 +0100
committerStefan Berger <stefanb@linux.vnet.ibm.com>2017-12-14 23:39:14 -0500
commit191adc9476371ad94771609d8b9a968d9332a962 (patch)
tree05b60c283bdc390ca1b714500fef0fecfcdcd8bd /hw/tpm
parent0bd6c8a9cfa4fd5c25a32ed39f3b8cb786b75b58 (diff)
tpm-be: ask model to the TPM interface
No need to store the mode in the backend, or to let the frontend set it itself. 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')
-rw-r--r--hw/tpm/tpm_tis.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c
index bf291e6eff..a780167feb 100644
--- a/hw/tpm/tpm_tis.c
+++ b/hw/tpm/tpm_tis.c
@@ -1072,8 +1072,6 @@ static void tpm_tis_realizefn(DeviceState *dev, Error **errp)
return;
}
- s->be_driver->fe_model = TPM_MODEL_TPM_TIS;
-
if (tpm_backend_init(s->be_driver, TPM_IF(s), errp)) {
return;
}
@@ -1108,6 +1106,7 @@ static void tpm_tis_class_init(ObjectClass *klass, void *data)
dc->props = tpm_tis_properties;
dc->reset = tpm_tis_reset;
dc->vmsd = &vmstate_tpm_tis;
+ tc->model = TPM_MODEL_TPM_TIS;
tc->request_completed = tpm_tis_request_completed;
}