summaryrefslogtreecommitdiff
path: root/src/drivers/spi/atmel.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/spi/atmel.c')
-rw-r--r--src/drivers/spi/atmel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drivers/spi/atmel.c b/src/drivers/spi/atmel.c
index 39cc95e609..4fe679d036 100644
--- a/src/drivers/spi/atmel.c
+++ b/src/drivers/spi/atmel.c
@@ -125,7 +125,7 @@ static int atmel_write(const struct spi_flash *flash, u32 offset, size_t len,
for (actual = 0; actual < len; actual += chunk_len) {
byte_addr = offset % page_size;
chunk_len = min(len - actual, page_size - byte_addr);
- chunk_len = spi_crop_chunk(sizeof(cmd), chunk_len);
+ chunk_len = spi_crop_chunk(&flash->spi, sizeof(cmd), chunk_len);
cmd[0] = CMD_AT25_PP;
cmd[1] = (offset >> 16) & 0xff;