aboutsummaryrefslogtreecommitdiff
path: root/include/sysemu/tpm_backend.h
diff options
context:
space:
mode:
authorStefan Berger <stefanb@linux.ibm.com>2021-06-15 16:21:20 +0200
committerStefan Berger <stefanb@linux.ibm.com>2021-06-15 10:55:12 -0400
commite542b71805dc4b7827e6c2f00a1170a61843345e (patch)
tree9f6a94e89b180e80e6822f2b410b825b46ff1bf0 /include/sysemu/tpm_backend.h
parent295f7dcb609e02d8902180e48ffa590bea531d7e (diff)
sysemu: Make TPM structures inaccessible if CONFIG_TPM is not defined
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20210614191335.1968807-5-stefanb@linux.ibm.com> [PMD: Remove tpm_init() / tpm_cleanup() stubs] Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'include/sysemu/tpm_backend.h')
-rw-r--r--include/sysemu/tpm_backend.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/sysemu/tpm_backend.h b/include/sysemu/tpm_backend.h
index 6f078f5f48..8fd3269c11 100644
--- a/include/sysemu/tpm_backend.h
+++ b/include/sysemu/tpm_backend.h
@@ -18,6 +18,8 @@
#include "sysemu/tpm.h"
#include "qapi/error.h"
+#ifdef CONFIG_TPM
+
#define TYPE_TPM_BACKEND "tpm-backend"
OBJECT_DECLARE_TYPE(TPMBackend, TPMBackendClass,
TPM_BACKEND)
@@ -209,4 +211,6 @@ TPMInfo *tpm_backend_query_tpm(TPMBackend *s);
TPMBackend *qemu_find_tpm_be(const char *id);
-#endif
+#endif /* CONFIG_TPM */
+
+#endif /* TPM_BACKEND_H */