[PATCH v3 03/15] mtd: spi-nor: Align default_init() handling for SPI_NOR_SKIP_SFDP
Esben Haabendal
esben at geanix.com
Thu Jul 11 06:00:03 PDT 2024
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 at geanix.com>
---
drivers/mtd/spi-nor/core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
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);
--
2.45.2
More information about the linux-mtd
mailing list