mtd: spi-nor: core: Call spi_nor_post_sfdp_fixups() only when SFDP is defined
authorTudor Ambarus <tudor.ambarus@microchip.com>
Tue, 7 Dec 2021 14:02:44 +0000 (16:02 +0200)
committerTudor Ambarus <tudor.ambarus@microchip.com>
Tue, 7 Dec 2021 15:05:10 +0000 (17:05 +0200)
commit5273cc6df984967068f3acfcbe0def1562db5409
treee807d0562f148f6ccdddd4c9923fee0969ad5ae2
parentff67592cbdfc74c4237b2d02c4cb50a5eef56ff1
mtd: spi-nor: core: Call spi_nor_post_sfdp_fixups() only when SFDP is defined

spi_nor_post_sfdp_fixups() was called even when there were no SFDP
tables defined. late_init() should be instead used for flashes that
do not define SFDP tables.

Use spi_nor_post_sfdp_fixups() just to fix SFDP data. post_sfdp()
hook is as of now used just by s28hs512t, mt35xu512aba, and both
support SFDP, there's no functional change with this patch.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: Pratyush Yadav <p.yadav@ti.com>
Link: https://lore.kernel.org/r/20211207140254.87681-5-tudor.ambarus@microchip.com
drivers/mtd/spi-nor/core.c
drivers/mtd/spi-nor/sfdp.c