Unverified Commit 9f5ac599 authored by Fabrizio Castro's avatar Fabrizio Castro Committed by Mark Brown
Browse files

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: default avatarFabrizio Castro <fabrizio.castro.jz@renesas.com>
Reviewed-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20230715010407.1751715-6-fabrizio.castro.jz@renesas.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 2ed2699f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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 */