summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-axi-spi-engine.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2022-08-30 20:28:21 +0200
committerMark Brown <broonie@kernel.org>2022-08-31 13:13:11 +0200
commitc9448aa41ac7dd223a6bef79e71d6c168593ebb7 (patch)
treead5af8a3189b362a83c19b50e07a9dc17584b901 /drivers/spi/spi-axi-spi-engine.c
parentspi: stm32-qspi: Replace of_gpio_named_count() by gpiod_count() (diff)
downloadlinux-c9448aa41ac7dd223a6bef79e71d6c168593ebb7.tar.xz
linux-c9448aa41ac7dd223a6bef79e71d6c168593ebb7.zip
spi: stm32-qspi: Refactor dual flash mode enable check in ->setup()
gpiod_count() either returns positive number of the CS or negative error code. In the stm32_qspi_setup() we check that configuration has enough CS for the dual flash mode and SPI mode is not changing over the lines of the code. Taking all above into considertion, refactor dual flash mode enable check by dropping unneeded CS check and reusing local mode variable. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Link: https://lore.kernel.org/r/20220830182821.47919-2-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-axi-spi-engine.c')
0 files changed, 0 insertions, 0 deletions