mtd: spi-nor: Introduce 'struct spi_nor_controller_ops'
authorTudor Ambarus <tudor.ambarus@microchip.com>
Tue, 24 Sep 2019 07:45:53 +0000 (07:45 +0000)
committerTudor Ambarus <tudor.ambarus@microchip.com>
Wed, 23 Oct 2019 06:27:21 +0000 (09:27 +0300)
commit45397787536434648495f7b02a7e669ab8ae12f3
treebd74c0a516ec9d4659fe162f3f336ee1cec4bdfd
parent1a21bdfeac051c667352e8e16ee51b90e9a837c5
mtd: spi-nor: Introduce 'struct spi_nor_controller_ops'

Move all SPI NOR controller driver specific ops in a dedicated
structure. 'struct spi_nor' becomes lighter.

Use size_t for lengths in 'int (*write_reg)()' and 'int (*read_reg)()'.
Rename wite/read_buf to buf, the name of the functions are
suggestive enough. Constify buf in int (*write_reg). Comply with these
changes in the SPI NOR controller drivers.

Suggested-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
drivers/mtd/spi-nor/aspeed-smc.c
drivers/mtd/spi-nor/cadence-quadspi.c
drivers/mtd/spi-nor/hisi-sfc.c
drivers/mtd/spi-nor/intel-spi.c
drivers/mtd/spi-nor/mtk-quadspi.c
drivers/mtd/spi-nor/nxp-spifi.c
drivers/mtd/spi-nor/spi-nor.c
include/linux/mtd/spi-nor.h