spi: tegra114: Use list_is_last() instead of open-coded
Subsystems (3)
PATCH 1/1 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 Axel Lin <[email protected]>
--- drivers/spi/spi-tegra114.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/spi/spi-tegra114.c +2 -2
@@ -853,8 +853,8 @@ complete_xfer: 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 {
Signature · 8 lines
1.8.1.2 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Mark Brown
AppliedQuoted 1 line · Axel Lin
For better readability, and then we can remove the comment for last transfer.
Applied, thanks.