summaryrefslogtreecommitdiff
path: root/drivers/tpm
diff options
context:
space:
mode:
authorJohannes Holland <johannes.holland@infineon.com>2020-05-11 15:22:25 +0200
committerTom Rini <trini@konsulko.com>2020-07-08 17:21:46 -0400
commitbedbb383e1bf5777386c885950f7fb0a21b0daa2 (patch)
treee1ab7234fb60d613986556ac259f4f974b333c64 /drivers/tpm
parent06bea4980980c05106944b0192f24700fe479f0b (diff)
tpm: add #ifndef to fix redeclaration build errors
tpm_tis_spi.c directly includes tpm_tis.h and tpm-v2.h which both define the same enums (see e.g. TPM_ACCESS_VALID). Add an #ifndef to prevent redeclaration errors. Signed-off-by: Johannes Holland <johannes.holland@infineon.com>
Diffstat (limited to 'drivers/tpm')
-rw-r--r--drivers/tpm/tpm_tis.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/tpm/tpm_tis.h b/drivers/tpm/tpm_tis.h
index 947585f8e3..2a160fe05c 100644
--- a/drivers/tpm/tpm_tis.h
+++ b/drivers/tpm/tpm_tis.h
@@ -104,6 +104,7 @@ struct tpm_cmd_t {
/* Max number of iterations after i2c NAK */
#define MAX_COUNT 3
+#ifndef __TPM_V2_H
/*
* Max number of iterations after i2c NAK for 'long' commands
*
@@ -127,5 +128,6 @@ enum tis_status {
TPM_STS_DATA_AVAIL = 0x10,
TPM_STS_DATA_EXPECT = 0x08,
};
+#endif
#endif