]> asedeno.scripts.mit.edu Git - linux.git/commit
mtd: spi-nor: Use nor->params
authorTudor Ambarus <tudor.ambarus@microchip.com>
Fri, 23 Aug 2019 15:53:37 +0000 (15:53 +0000)
committerTudor Ambarus <tudor.ambarus@microchip.com>
Wed, 28 Aug 2019 09:40:26 +0000 (12:40 +0300)
commit1e35a56781b4b5d83f428c2c40a1b6fa5bca8cd1
treeebd8394d29df96a265fb4efb50fdc3fbd7fd7022
parent47599127a2e8c42843e27fc370e63cc5344a2a38
mtd: spi-nor: Use nor->params

The Flash parameters and settings are now stored in 'struct spi_nor'.
Use this instead of the stack allocated params.

Few functions stop passing pointer to params, as they can get it from
'struct spi_nor'. spi_nor_parse_sfdp() and children will keep passing
pointer to params because of the roll-back mechanism: in case the
parsing of SFDP fails, the legacy flash parameter and settings will be
restored.

Zeroing params is no longer needed because all SPI NOR users kzalloc
'struct spi_nor'.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Vignesh Raghavendra <vigneshr@ti.com>
drivers/mtd/spi-nor/spi-nor.c