Skip to content

Commit

Permalink
spi: tegra114: Use list_is_last() instead of open-coded
Browse files Browse the repository at this point in the history
For better readability, and then we can remove the comment for last transfer.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Axel Lin authored and Mark Brown committed Feb 3, 2014
1 parent 38dbfb5 commit 971e908
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/spi/spi-tegra114.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 971e908

Please sign in to comment.