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.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/sysemu/tpm.h b/include/sysemu/tpm.h
index c1438907de..c8afa179e5 100644
--- a/include/sysemu/tpm.h
+++ b/include/sysemu/tpm.h
@@ -32,11 +32,13 @@ TPMVersion tpm_tis_get_tpm_version(Object *obj);
static inline TPMVersion tpm_get_version(void)
{
+#ifdef CONFIG_TPM
Object *obj = object_resolve_path_type("", TYPE_TPM_TIS, NULL);
if (obj) {
return tpm_tis_get_tpm_version(obj);
}
+#endif
return TPM_VERSION_UNSPEC;
}