Skip to content

Commit

Permalink
spi: stm32: Revert "properly handle 0 byte transfer"
Browse files Browse the repository at this point in the history
0 byte transfer handling is now done within the core in code added
by commit b306320 ("spi: Skip zero-length transfers in spi_transfer_one_message()")

This reverts commit 2269f5a ("spi: stm32: properly handle 0 byte transfer")

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Link: https://lore.kernel.org/r/1625646426-5826-5-git-send-email-alain.volmat@foss.st.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Alain Volmat authored and Mark Brown committed Jul 11, 2021
1 parent 9d53541 commit 70526e0
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions drivers/spi/spi-stm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -1647,10 +1647,6 @@ static int stm32_spi_transfer_one(struct spi_master *master,
struct stm32_spi *spi = spi_master_get_devdata(master);
int ret;

/* Don't do anything on 0 bytes transfers */
if (transfer->len == 0)
return 0;

spi->tx_buf = transfer->tx_buf;
spi->rx_buf = transfer->rx_buf;
spi->tx_len = spi->tx_buf ? transfer->len : 0;
Expand Down

0 comments on commit 70526e0

Please sign in to comment.