aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/i2c/tpm/tis_atmel.c
diff options
context:
space:
mode:
authorElyes HAOUAS <ehaouas@noos.fr>2019-12-18 21:26:33 +0100
committerPatrick Georgi <pgeorgi@google.com>2019-12-20 17:48:00 +0000
commit361a935332489c635192b39204c7ec7af1667c8f (patch)
treed9e7589a4c475ba8c991c873c5600d6631f4d62d /src/drivers/i2c/tpm/tis_atmel.c
parentf97c1c9d86ff56ba9d1de4fc7c9499742224d365 (diff)
{drivers,southbridge}: Replace min() with MIN()
This is to remove min/max() from <stdlib.h>. Change-Id: Ica03d9aec8a81f57709abcac655dfb0ebce3f8c6 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/37818 Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers/i2c/tpm/tis_atmel.c')
-rw-r--r--src/drivers/i2c/tpm/tis_atmel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/drivers/i2c/tpm/tis_atmel.c b/src/drivers/i2c/tpm/tis_atmel.c
index 793418a96a..74b4830b6a 100644
--- a/src/drivers/i2c/tpm/tis_atmel.c
+++ b/src/drivers/i2c/tpm/tis_atmel.c
@@ -14,13 +14,13 @@
#include <assert.h>
#include <commonlib/endian.h>
+#include <commonlib/helpers.h>
#include <console/console.h>
#include <delay.h>
#include <device/i2c_simple.h>
#include <endian.h>
#include <lib.h>
#include <security/tpm/tis.h>
-#include <stdlib.h>
#include <timer.h>
#include <types.h>
@@ -99,7 +99,7 @@ int tis_sendrecv(const uint8_t *sendbuf, size_t sbuf_size,
return -1;
/* Determine the number of bytes remaining */
- recv_bytes = min(be32_to_cpu(*(uint32_t *)&header->length),
+ recv_bytes = MIN(be32_to_cpu(*(uint32_t *)&header->length),
max_recv_bytes);
/* Determine if there is additional response data */