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:
parent
2ed2699f58
commit
9f5ac59980
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue