diff mbox series

[v3,03/15] mtd: spi-nor: Align default_init() handling for SPI_NOR_SKIP_SFDP

Message ID 20240711-macronix-mx25l3205d-fixups-v3-3-99353461dd2d@geanix.com (mailing list archive)
State New, archived
Headers show
Series mtd: spi-nor: macronix: workaround for device id re-use | expand

Commit Message

Esben Haabendal July 11, 2024, 1 p.m. UTC
Currently, flashes declared with size != 0 in struct flash_info and without
SPI_NOR_SKIP_SFDP in no_sfdp_flags is initialized using struct flash_info.

Flashes declared with size != 0 and SPI_NOR_SKIP_SFDP set is handled
similarly, with the only difference being that the ->default_init() hooks
is ignored.

With the only in-tree user of SPI_NOR_SKIP_SFDP is the Spansion s25fl256s0
flash, which does not have either manufacturer or
flash_info ->default_init() hooks, it should be safe to align this, so that
they are handled in the same way.

Signed-off-by: Esben Haabendal <esben@geanix.com>
---
 drivers/mtd/spi-nor/core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
index 39b28700ce28..d58f107f62ec 100644
--- a/drivers/mtd/spi-nor/core.c
+++ b/drivers/mtd/spi-nor/core.c
@@ -3029,8 +3029,7 @@  static int spi_nor_init_params(struct spi_nor *nor)
 		}
 	} else {
 		spi_nor_no_sfdp_init_params(nor);
-		if (!(nor->info->no_sfdp_flags & SPI_NOR_SKIP_SFDP))
-			spi_nor_manufacturer_init_params(nor);
+		spi_nor_manufacturer_init_params(nor);
 
 		if (spi_nor_try_sfdp(nor))
 			spi_nor_try_sfdp_init_params(nor);