Skip to contentSkip to conversation

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

PATCH Applied Axel Lin 2 participants 2 messages Jan 15, 2014 – Jan 27, 2014

Subsystems (3)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

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.

---
 drivers/spi/spi-tegra114.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/spi/spi-tegra114.c +2 -2
index 413c718..ead3ae8 100644
@@ -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
Applied
#1 lore raw
Quoted 1 line · Axel Lin

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

Applied, thanks.