mtd: spi-nor: split spi_nor_spimem_xfer_data()
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Tue, 18 Feb 2020 21:21:00 +0000 (00:21 +0300)
committerTudor Ambarus <tudor.ambarus@microchip.com>
Wed, 19 Feb 2020 07:17:22 +0000 (09:17 +0200)
commitb7ad6be2ee67b12cba31d30deb34beab19acac57
tree6f4703f9b38a2c100c9d248fccb936b6a367554b
parent8c79fa6c44deac8042bd747527fea06a32738158
mtd: spi-nor: split spi_nor_spimem_xfer_data()

spi_nor_spimem_xfer_data() being a helper function for the data reads/
writes contains 3 fragments that depend on the data direction; and I'm
going to add another one to call the SPI dirmap API...
I think this function should be split so that the common fragments are
put into 2 functions, spi_nor_spimem_bounce() and spi_nor_spimem_exec_op()
called from spi_nor_spimem_{read|write}_data(), and the data direction
dependent bits moved back into those read/write functions -- that way we
would be able to avoid *goto*s otherwise needed in the next patch adding
the SPI dirmap support...

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
drivers/mtd/spi-nor/spi-nor.c