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:
parent
31e5d7a303
commit
951aa503aa
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue