mtd: spi-nor: spansion: slightly rework control flow in late_init()
authorMichael Walle <michael@walle.cc>
Wed, 23 Feb 2022 13:43:53 +0000 (14:43 +0100)
committerTudor Ambarus <tudor.ambarus@microchip.com>
Fri, 25 Feb 2022 16:12:42 +0000 (18:12 +0200)
commit6235ff040c1372acab928c308f43908840e991d3
tree4564408cab95f25a88c7197cfdd71ae11ecf92c3
parent2b18a18ea7f8e234e66046f64787efd21c290538
mtd: spi-nor: spansion: slightly rework control flow in late_init()

Don't return early when the flash is smaller than or equal to 16MiB. We
need to be able to register hooks for all sizes of flashes. This also has
the benefit that it increases the readability of the code because the
action, i.e. registering the fixups, is connected to the condition, i.e.
flashes larger than 16MiB.

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Tested-by: Pratyush Yadav <p.yadav@ti.com> # on mt35xu512aba, s28hs512t
Reviewed-by: Pratyush Yadav <p.yadav@ti.com>
Link: https://lore.kernel.org/r/20220223134358.1914798-28-michael@walle.cc
drivers/mtd/spi-nor/spansion.c