summaryrefslogtreecommitdiff
path: root/src/drivers/spi/flashconsole.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/spi/flashconsole.c')
-rw-r--r--src/drivers/spi/flashconsole.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/drivers/spi/flashconsole.c b/src/drivers/spi/flashconsole.c
index 98f3cb4796..80c63e07ea 100644
--- a/src/drivers/spi/flashconsole.c
+++ b/src/drivers/spi/flashconsole.c
@@ -11,12 +11,12 @@
* GNU General Public License for more details.
*/
+#include <commonlib/helpers.h>
#include <commonlib/region.h>
#include <boot_device.h>
#include <fmap.h>
#include <console/console.h>
#include <console/flash.h>
-#include <stdlib.h>
#include <types.h>
#define LINE_BUFFER_SIZE 128
@@ -55,7 +55,7 @@ void flashconsole_init(void)
for (i = 0; i < len && offset < size;) {
// Fill the buffer on first iteration
if (i == 0) {
- len = min(READ_BUFFER_SIZE, size - offset);
+ len = MIN(READ_BUFFER_SIZE, size - offset);
if (rdev_readat(&rdev, buffer, offset, len) != len)
return;
}