summaryrefslogtreecommitdiff
path: root/src/drivers/spi/spi-generic.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/spi/spi-generic.c')
-rw-r--r--src/drivers/spi/spi-generic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/drivers/spi/spi-generic.c b/src/drivers/spi/spi-generic.c
index 05bfb82bf8..bc4fb086cd 100644
--- a/src/drivers/spi/spi-generic.c
+++ b/src/drivers/spi/spi-generic.c
@@ -13,9 +13,9 @@
*/
#include <assert.h>
+#include <commonlib/helpers.h>
#include <spi-generic.h>
#include <stddef.h>
-#include <stdlib.h>
#include <string.h>
int spi_claim_bus(const struct spi_slave *slave)
@@ -113,7 +113,7 @@ unsigned int spi_crop_chunk(const struct spi_slave *slave, unsigned int cmd_len,
if (deduct_cmd_len && (ctrlr_max > cmd_len))
ctrlr_max -= cmd_len;
- return min(ctrlr_max, buf_len);
+ return MIN(ctrlr_max, buf_len);
}
void __weak spi_init(void)