summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/spi-nor/spansion.c
diff options
context:
space:
mode:
authorTudor Ambarus <tudor.ambarus@microchip.com>2021-10-29 20:26:19 +0300
committerTudor Ambarus <tudor.ambarus@microchip.com>2021-11-17 14:41:29 +0200
commitd396e735ba0c91911aac5d696b5da090e38e919b (patch)
tree635d6a792e2f44c5e2c86a0cdf0c49e06b054ff7 /drivers/mtd/spi-nor/spansion.c
parentf22a48dbd01b66c01403b6182ad871476c19a813 (diff)
downloadlinux-d396e735ba0c91911aac5d696b5da090e38e919b.tar.bz2
mtd: spi-nor: spansion: Use manufacturer late_init()
spansion_post_sfdp_fixups() was called regardless if the flash defined SFDP tables or not. A better place for this kind of parameters init is in manufacturer's late_init() hook. post_sfdp() should be called only when SFDP is defined. No functional change in this patch. Instead of doing the 4b opcodes settings at manufacturer level, thus also for every flash that will be introduced, this should be done just where it is needed, per flash. I'll let this for other patch. Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com> Reviewed-by: Michael Walle <michael@walle.cc> Reviewed-by: Pratyush Yadav <p.yadav@ti.com> Link: https://lore.kernel.org/r/20211029172633.886453-12-tudor.ambarus@microchip.com
Diffstat (limited to 'drivers/mtd/spi-nor/spansion.c')
-rw-r--r--drivers/mtd/spi-nor/spansion.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/spi-nor/spansion.c b/drivers/mtd/spi-nor/spansion.c
index ee82dcd75310..a3ea0135f7b1 100644
--- a/drivers/mtd/spi-nor/spansion.c
+++ b/drivers/mtd/spi-nor/spansion.c
@@ -276,7 +276,7 @@ static const struct flash_info spansion_parts[] = {
},
};
-static void spansion_post_sfdp_fixups(struct spi_nor *nor)
+static void spansion_late_init(struct spi_nor *nor)
{
if (nor->params->size <= SZ_16M)
return;
@@ -288,7 +288,7 @@ static void spansion_post_sfdp_fixups(struct spi_nor *nor)
}
static const struct spi_nor_fixups spansion_fixups = {
- .post_sfdp = spansion_post_sfdp_fixups,
+ .late_init = spansion_late_init,
};
const struct spi_nor_manufacturer spi_nor_spansion = {