src/{device,drivers}: Use 'include <stdlib.h>' when appropriate
Also, including <types.h>, is supposed to provide stdint and stddef.
Change-Id: I99918a5a77e759bc7d4192d2c3fd6ad493c70248
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/33681
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
diff --git a/src/drivers/i2c/tpm/cr50.c b/src/drivers/i2c/tpm/cr50.c
index 3c70b7e..6714bd4 100644
--- a/src/drivers/i2c/tpm/cr50.c
+++ b/src/drivers/i2c/tpm/cr50.c
@@ -29,7 +29,6 @@
#include <arch/early_variables.h>
#include <commonlib/endian.h>
-#include <stdint.h>
#include <string.h>
#include <types.h>
#include <delay.h>
@@ -38,6 +37,8 @@
#include <endian.h>
#include <timer.h>
#include <security/tpm/tis.h>
+#include <stdlib.h>
+
#include "tpm.h"
#define CR50_MAX_BUFSIZE 63
diff --git a/src/drivers/i2c/tpm/tis_atmel.c b/src/drivers/i2c/tpm/tis_atmel.c
index bfc25c4..42df292 100644
--- a/src/drivers/i2c/tpm/tis_atmel.c
+++ b/src/drivers/i2c/tpm/tis_atmel.c
@@ -13,7 +13,6 @@
*/
#include <arch/early_variables.h>
-#include <stdint.h>
#include <assert.h>
#include <commonlib/endian.h>
#include <console/console.h>
@@ -22,7 +21,9 @@
#include <endian.h>
#include <lib.h>
#include <security/tpm/tis.h>
+#include <stdlib.h>
#include <timer.h>
+#include <types.h>
#define RECV_TIMEOUT (1 * 1000) /* 1 second */
#define XMIT_TIMEOUT (1 * 1000) /* 1 second */