Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/82057?usp=email )
(
3 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: drivers/{crb,pc80/tpm}: Drop conflicting tpm_config_t typedef ......................................................................
drivers/{crb,pc80/tpm}: Drop conflicting tpm_config_t typedef
When both CRB and pc80 TPM drivers are compiled in, building fails because the tpm_config_t typedef has two incompatible definitions. Given that typedefs are discouraged by the project's coding style, simply get rid of the tpm_config_t typedef.
TEST=Compile MSI PRO Z690-A target with CRB and PC80 TPM chips enabled in devicetree.
Change-Id: Id41717e265362303a17745303a907c9c8f4f4e12 Signed-off-by: Michał Żygowski michal.zygowski@3mdeb.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/82057 Reviewed-by: Sergii Dmytruk sergii.dmytruk@3mdeb.com Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Angel Pons th3fanbus@gmail.com --- M src/drivers/crb/chip.h M src/drivers/pc80/tpm/chip.h M src/drivers/pc80/tpm/tis.c 3 files changed, 7 insertions(+), 5 deletions(-)
Approvals: Sergii Dmytruk: Looks good to me, approved build bot (Jenkins): Verified Angel Pons: Looks good to me, approved
diff --git a/src/drivers/crb/chip.h b/src/drivers/crb/chip.h index f0e471f..ac7ea96 100644 --- a/src/drivers/crb/chip.h +++ b/src/drivers/crb/chip.h @@ -3,7 +3,7 @@ #ifndef DRIVERS_CRB_CHIP_H #define DRIVERS_CRB_CHIP_H
-typedef struct drivers_crb_config { -} tpm_config_t; +struct drivers_crb_config { +};
#endif /* DRIVERS_CRB_CHIP_H */ diff --git a/src/drivers/pc80/tpm/chip.h b/src/drivers/pc80/tpm/chip.h index af73153..af37cee 100644 --- a/src/drivers/pc80/tpm/chip.h +++ b/src/drivers/pc80/tpm/chip.h @@ -3,7 +3,7 @@ #ifndef DRIVERS_PC80_TPM_CHIP_H #define DRIVERS_PC80_TPM_CHIP_H
-typedef struct drivers_pc80_tpm_config { +struct drivers_pc80_tpm_config { /* * TPM Interrupt polarity: * @@ -13,6 +13,6 @@ * Falling Edge 3 */ u8 irq_polarity; -} tpm_config_t; +};
#endif /* DRIVERS_PC80_TPM_CHIP_H */ diff --git a/src/drivers/pc80/tpm/tis.c b/src/drivers/pc80/tpm/tis.c index d811c52..3f863a3 100644 --- a/src/drivers/pc80/tpm/tis.c +++ b/src/drivers/pc80/tpm/tis.c @@ -779,9 +779,11 @@
static void lpc_tpm_set_resources(struct device *dev) { - tpm_config_t *config = (tpm_config_t *)dev->chip_info; + struct drivers_pc80_tpm_config *config; DEVTREE_CONST struct resource *res;
+ config = (struct drivers_pc80_tpm_config *)dev->chip_info; + for (res = dev->resource_list; res; res = res->next) { if (!(res->flags & IORESOURCE_ASSIGNED)) continue;