spi: tegra114: Use list_is_last() instead of open-coded
authorAxel Lin <axel.lin@ingics.com>
Wed, 15 Jan 2014 06:07:04 +0000 (14:07 +0800)
committerMark Brown <broonie@linaro.org>
Mon, 3 Feb 2014 12:25:39 +0000 (12:25 +0000)
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>
drivers/spi/spi-tegra114.c

index 413c718434927f0d3278c051d15040639a68237a..ead3ae89a08f6fb31714b537dc52861ad8159e14 100644 (file)
@@ -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 {
This page took 0.025442 seconds and 5 git commands to generate.