@@ -15,10 +15,12 @@
#include "qapi/qapi-types-tpm.h"
#include "qom/object.h"
-int tpm_config_parse(QemuOptsList *opts_list, const char *optarg);
int tpm_init(void);
void tpm_cleanup(void);
+#ifdef CONFIG_TPM
+int tpm_config_parse(QemuOptsList *opts_list, const char *optarg);
+
typedef enum TPMVersion {
TPM_VERSION_UNSPEC = 0,
TPM_VERSION_1_2 = 1,
@@ -73,4 +75,6 @@ static inline TPMVersion tpm_get_version(TPMIf *ti)
return TPM_IF_GET_CLASS(ti)->get_version(ti);
}
+#endif /* CONFIG_TPM */
+
#endif /* QEMU_TPM_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 */