spi: rzv2m-csi: Replace unnecessary ternary operators

The ternary operators used to initialize tx_completed and rx_completed
are not necessary, replace them with a better implementation.

Signed-off-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20230715010407.1751715-6-fabrizio.castro.jz@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Fabrizio Castro 2023-07-15 02:04:02 +01:00 committed by Mark Brown
parent 2ed2699f58
commit 9f5ac59980
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 2 additions and 2 deletions

View File

@ -439,8 +439,8 @@ static int rzv2m_csi_setup(struct spi_device *spi)
static int rzv2m_csi_pio_transfer(struct rzv2m_csi_priv *csi)
{
bool tx_completed = csi->txbuf ? false : true;
bool rx_completed = csi->rxbuf ? false : true;
bool tx_completed = !csi->txbuf;
bool rx_completed = !csi->rxbuf;
int ret = 0;
/* Make sure the TX FIFO is empty */