]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: spi-nor: spansion: Rework spi_nor_cypress_octal_dtr_enable()
authorTudor Ambarus <tudor.ambarus@microchip.com>
Wed, 20 Apr 2022 10:34:24 +0000 (13:34 +0300)
committerPratyush Yadav <p.yadav@ti.com>
Wed, 27 Apr 2022 09:27:36 +0000 (14:57 +0530)
commit80bb46f71d4ee8ca06890cd58544a8c87728606f
tree818017f9b2009aef0a75c3e641ba474bd2e3c062
parent157fc8b14219f46f488c36453e14be47fd36618f
mtd: spi-nor: spansion: Rework spi_nor_cypress_octal_dtr_enable()

Introduce template operation to remove code duplication.
Split spi_nor_cypress_octal_dtr_enable() in
spi_nor_cypress_octal_dtr_ena() spi_nor_cypress_octal_dtr_dis() as it no
longer made sense to try to keep everything alltogether: too many
"if (enable)" throughout the code, which made the code difficult to read.
Add debug messages in case spi_nor_read_id() fails.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
Reviewed-by: Pratyush Yadav <p.yadav@ti.com>
Reviewed-by: Michael Walle <michael@walle.cc>
Link: https://lore.kernel.org/r/20220420103427.47867-9-tudor.ambarus@microchip.com
drivers/mtd/spi-nor/spansion.c