summaryrefslogtreecommitdiff
path: root/drivers/mtd/spi/spi_flash.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/spi/spi_flash.c')
-rw-r--r--drivers/mtd/spi/spi_flash.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c
index f7634df..9430424 100644
--- a/drivers/mtd/spi/spi_flash.c
+++ b/drivers/mtd/spi/spi_flash.c
@@ -928,10 +928,10 @@ static int micron_quad_enable(struct spi_flash *flash)
static const struct spi_flash_info *spi_flash_read_id(struct spi_flash *flash)
{
int tmp;
- u8 id[5];
+ u8 id[SPI_FLASH_MAX_ID_LEN];
const struct spi_flash_info *info;
- tmp = spi_flash_cmd(flash->spi, CMD_READ_ID, id, 5);
+ tmp = spi_flash_cmd(flash->spi, CMD_READ_ID, id, SPI_FLASH_MAX_ID_LEN);
if (tmp < 0) {
printf("SF: error %d reading JEDEC ID\n", tmp);
return ERR_PTR(tmp);