All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] tpm: add #ifndef to fix redeclaration build errors
@ 2020-05-11 13:22 Johannes Holland
  2020-05-11 13:22 ` [PATCH 2/2] spi: add support for all spi modes with soft spi Johannes Holland
  2020-07-09  0:22 ` [PATCH 1/2] tpm: add #ifndef to fix redeclaration build errors Tom Rini
  0 siblings, 2 replies; 4+ messages in thread
From: Johannes Holland @ 2020-05-11 13:22 UTC (permalink / raw)
  To: u-boot

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 | 2 ++
 1 file changed, 2 insertions(+)

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
-- 
2.26.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-07-09  8:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-11 13:22 [PATCH 1/2] tpm: add #ifndef to fix redeclaration build errors Johannes Holland
2020-05-11 13:22 ` [PATCH 2/2] spi: add support for all spi modes with soft spi Johannes Holland
2020-07-09  8:22   ` Jagan Teki
2020-07-09  0:22 ` [PATCH 1/2] tpm: add #ifndef to fix redeclaration build errors Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.