From: Tudor Ambarus Date: Fri, 29 Oct 2021 17:26:18 +0000 (+0300) Subject: mtd: spi-nor: sst: Use manufacturer late_init() to set _write() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=f22a48dbd01b66c01403b6182ad871476c19a813;p=linux.git 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 Reviewed-by: Michael Walle Reviewed-by: Pratyush Yadav Link: https://lore.kernel.org/r/20211029172633.886453-11-tudor.ambarus@microchip.com --- diff --git a/drivers/mtd/spi-nor/sst.c b/drivers/mtd/spi-nor/sst.c index 660aabde477a7..3593aae0920f0 100644 --- a/drivers/mtd/spi-nor/sst.c +++ b/drivers/mtd/spi-nor/sst.c @@ -177,14 +177,14 @@ out: 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 = {