]> git.itanic.dy.fi Git - linux-stable/commit
mtd: spi-nor: store .n_banks in struct spi_nor_flash_parameter
authorMichael Walle <mwalle@kernel.org>
Fri, 8 Sep 2023 10:16:25 +0000 (12:16 +0200)
committerTudor Ambarus <tudor.ambarus@linaro.org>
Tue, 19 Sep 2023 15:49:46 +0000 (18:49 +0300)
commit9983e6da917d7a8e367be05be167b1eeb6c8f120
treefa4c79b75d0d0619ff0640119ebf9deaf74803cb
parentd0cfd228b34c125b76a9a7fd2d69ebf9ff7e5534
mtd: spi-nor: store .n_banks in struct spi_nor_flash_parameter

First, fixups might want to replace the n_banks parameter, thus we need
it in the (writable) parameter struct. Secondly, this way we can have a
default in the core and just skip setting the n_banks in the flash_info
database. Most of the flashes doesn't have more than one bank.

Signed-off-by: Michael Walle <mwalle@kernel.org>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/r/20230807-mtd-flash-info-db-rework-v3-7-e60548861b10@kernel.org
Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
drivers/mtd/spi-nor/core.c
drivers/mtd/spi-nor/core.h