Skip to content

Commit 9fcb099

Browse files
committed
mtd: spi-nor: print flash ID instead of name
We saw flash ID collisions which make the flash name unreliable. Print the manufacturer and device ID instead of the flash name. Lower the print to dev_dbg to stop polluting the kernel log. Suggested-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Michael Walle <michael@walle.cc> Link: https://lore.kernel.org/r/20231215082138.16063-2-tudor.ambarus@linaro.org Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
1 parent c692ba6 commit 9fcb099

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/mtd/spi-nor/core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3558,8 +3558,8 @@ int spi_nor_scan(struct spi_nor *nor, const char *name,
35583558
/* No mtd_info fields should be used up to this point. */
35593559
spi_nor_set_mtd_info(nor);
35603560

3561-
dev_info(dev, "%s (%lld Kbytes)\n", info->name,
3562-
(long long)mtd->size >> 10);
3561+
dev_dbg(dev, "Manufacturer and device ID: %*phN\n",
3562+
SPI_NOR_MAX_ID_LEN, nor->id);
35633563

35643564
dev_dbg(dev,
35653565
"mtd .name = %s, .size = 0x%llx (%lldMiB), "

0 commit comments

Comments
 (0)