aboutsummaryrefslogtreecommitdiff
path: root/include/sysemu/tpm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sysemu/tpm.h')
-rw-r--r--include/sysemu/tpm.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/sysemu/tpm.h b/include/sysemu/tpm.h
index 1a85564e47..68b2206463 100644
--- a/include/sysemu/tpm.h
+++ b/include/sysemu/tpm.h
@@ -15,6 +15,8 @@
#include "qapi/qapi-types-tpm.h"
#include "qom/object.h"
+#ifdef CONFIG_TPM
+
int tpm_config_parse(QemuOptsList *opts_list, const char *optarg);
int tpm_init(void);
void tpm_cleanup(void);
@@ -73,4 +75,11 @@ static inline TPMVersion tpm_get_version(TPMIf *ti)
return TPM_IF_GET_CLASS(ti)->get_version(ti);
}
+#else /* CONFIG_TPM */
+
+#define tpm_init() (0)
+#define tpm_cleanup()
+
+#endif /* CONFIG_TPM */
+
#endif /* QEMU_TPM_H */