All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Holland <johannes.holland@infineon.com>
To: u-boot@lists.denx.de
Subject: [PATCH 1/2] tpm: add #ifndef to fix redeclaration build errors
Date: Mon, 11 May 2020 15:22:25 +0200	[thread overview]
Message-ID: <1589203346-3857-1-git-send-email-johannes.holland@infineon.com> (raw)

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

             reply	other threads:[~2020-05-11 13:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-11 13:22 Johannes Holland [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1589203346-3857-1-git-send-email-johannes.holland@infineon.com \
    --to=johannes.holland@infineon.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.