projects
/
platform
/
kernel
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
06bea49
)
tpm: add #ifndef to fix redeclaration build errors
author
Johannes Holland
<johannes.holland@infineon.com>
Mon, 11 May 2020 13:22:25 +0000
(15:22 +0200)
committer
Tom Rini
<trini@konsulko.com>
Wed, 8 Jul 2020 21:21:46 +0000
(17:21 -0400)
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>
drivers/tpm/tpm_tis.h
patch
|
blob
|
history
diff --git
a/drivers/tpm/tpm_tis.h
b/drivers/tpm/tpm_tis.h
index 947585f8e339abdf8dddffed00125b2032cb2034..2a160fe05c9a56828f51bf2eb5dfb1bc479166d3 100644
(file)
--- 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