mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 13:55:32 +00:00
mtd: spi-nor: sst: Use manufacturer late_init() to set _write()
Setting the correct nor->mtd._write in a fixup hook was misleading, since this is not a fixup, just a specific setting for SST, that differs from the SPI NOR core default init. 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-11-tudor.ambarus@microchip.com
This commit is contained in:
parent
3fdad69e7f
commit
f22a48dbd0
1 changed files with 2 additions and 2 deletions
|
@ -177,14 +177,14 @@ static int sst_write(struct mtd_info *mtd, loff_t to, size_t len,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static void sst_post_sfdp_fixups(struct spi_nor *nor)
|
||||
static void sst_late_init(struct spi_nor *nor)
|
||||
{
|
||||
if (nor->info->flags & SST_WRITE)
|
||||
nor->mtd._write = sst_write;
|
||||
}
|
||||
|
||||
static const struct spi_nor_fixups sst_fixups = {
|
||||
.post_sfdp = sst_post_sfdp_fixups,
|
||||
.late_init = sst_late_init,
|
||||
};
|
||||
|
||||
const struct spi_nor_manufacturer spi_nor_sst = {
|
||||
|
|
Loading…
Reference in a new issue