mtd: spi nor: Support parse dts node label property

Change-Id: Ib27976970e12f4e97fab2b3c84f6580a09f2c9c1
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
This commit is contained in:
Jon Lin 2020-06-08 15:48:09 +08:00
parent 31e5d7a303
commit 951aa503aa
1 changed files with 4 additions and 0 deletions

View File

@ -42,6 +42,10 @@ static int spi_flash_probe_slave(struct spi_flash *flash)
return ret;
}
#if !CONFIG_IS_ENABLED(SPI_FLASH_TINY)
flash->mtd.name = (char *)ofnode_read_string(spi->dev->node, "label");
#endif
ret = spi_nor_scan(flash);
if (ret)
goto err_read_id;