diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2022-08-30 21:28:20 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-08-31 12:13:10 +0100 |
commit | eea0e7d20d6dab38522ac0a3af61fd92c53c34f6 (patch) | |
tree | b9695d63ab34cc0a796462443df4c24aa6fd61c4 | |
parent | fb43eb0a930ca9474484b1ff04c3fd532efdc8e3 (diff) | |
download | linux-eea0e7d20d6dab38522ac0a3af61fd92c53c34f6.tar.bz2 |
spi: stm32-qspi: Replace of_gpio_named_count() by gpiod_count()
As a preparation to unexport of_gpio_named_count(), convert the
driver to use gpiod_count() instead.
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-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | drivers/spi/spi-stm32-qspi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi-stm32-qspi.c b/drivers/spi/spi-stm32-qspi.c index 227f450aa5f0..5858f5f9c758 100644 --- a/drivers/spi/spi-stm32-qspi.c +++ b/drivers/spi/spi-stm32-qspi.c @@ -656,7 +656,7 @@ static int stm32_qspi_setup(struct spi_device *spi) mode = spi->mode & (SPI_TX_OCTAL | SPI_RX_OCTAL); if ((mode == SPI_TX_OCTAL || mode == SPI_RX_OCTAL) || ((mode == (SPI_TX_OCTAL | SPI_RX_OCTAL)) && - of_gpio_named_count(qspi->dev->of_node, "cs-gpios") == -ENOENT)) { + gpiod_count(qspi->dev, "cs") == -ENOENT)) { dev_err(qspi->dev, "spi-rx-bus-width\\/spi-tx-bus-width\\/cs-gpios\n"); dev_err(qspi->dev, "configuration not supported\n"); @@ -681,7 +681,7 @@ static int stm32_qspi_setup(struct spi_device *spi) * are both set in spi->mode and "cs-gpios" properties is found in DT */ if (((spi->mode & (SPI_TX_OCTAL | SPI_RX_OCTAL)) == (SPI_TX_OCTAL | SPI_RX_OCTAL)) && - of_gpio_named_count(qspi->dev->of_node, "cs-gpios")) { + gpiod_count(qspi->dev, "cs")) { qspi->cr_reg |= CR_DFM; dev_dbg(qspi->dev, "Dual flash mode enable"); } |