Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 971e9084 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown
Browse files

spi: tegra114: Use list_is_last() instead of open-coded



For better readability, and then we can remove the comment for last transfer.

Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 38dbfb59
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -853,8 +853,8 @@ static int tegra_spi_transfer_one_message(struct spi_master *master,
					SPI_COMMAND1);
			tegra_spi_transfer_delay(xfer->delay_usecs);
			goto exit;
		} else if (msg->transfers.prev == &xfer->transfer_list) {
			/* This is the last transfer in message */
		} else if (list_is_last(&xfer->transfer_list,
					&msg->transfers)) {
			if (xfer->cs_change)
				tspi->cs_control = spi;
			else {