diff mbox

[PULL,v1,09/21] tpm: remove init() class method

Message ID 1508436175-1596-10-git-send-email-stefanb@linux.vnet.ibm.com (mailing list archive)
State New, archived
Headers show

Commit Message

Stefan Berger Oct. 19, 2017, 6:02 p.m. UTC
From: Marc-André Lureau <marcandre.lureau@redhat.com>

No backend use it.

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>
---
 backends/tpm.c               | 4 +---
 include/sysemu/tpm_backend.h | 2 --
 2 files changed, 1 insertion(+), 5 deletions(-)
diff mbox

Patch

diff --git a/backends/tpm.c b/backends/tpm.c
index ca3a78e..dc750d4 100644
--- a/backends/tpm.c
+++ b/backends/tpm.c
@@ -47,13 +47,11 @@  enum TpmType tpm_backend_get_type(TPMBackend *s)
 int tpm_backend_init(TPMBackend *s, TPMState *state,
                      TPMRecvDataCB *datacb)
 {
-    TPMBackendClass *k = TPM_BACKEND_GET_CLASS(s);
-
     s->tpm_state = state;
     s->recv_data_callback = datacb;
     s->had_startup_error = false;
 
-    return k->init ? k->init(s) : 0;
+    return 0;
 }
 
 int tpm_backend_startup_tpm(TPMBackend *s)
diff --git a/include/sysemu/tpm_backend.h b/include/sysemu/tpm_backend.h
index a4288df..b08f985 100644
--- a/include/sysemu/tpm_backend.h
+++ b/include/sysemu/tpm_backend.h
@@ -66,8 +66,6 @@  struct TPMBackendClass {
 
     TPMBackend *(*create)(QemuOpts *opts, const char *id);
 
-    /* initialize the backend */
-    int (*init)(TPMBackend *t);
     /* start up the TPM on the backend */
     int (*startup_tpm)(TPMBackend *t);