diff options
author | Axel Lin <axel.lin@ingics.com> | 2014-01-15 14:07:04 +0800 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-02-03 12:25:39 +0000 |
commit | 971e9084beb50c0b244ff95ef2d888f7d158b8a8 (patch) | |
tree | a50cbc0e49b1ba0880700477e72884cbcfaa6248 /drivers/spi/spi-tegra114.c | |
parent | 38dbfb59d1175ef458d006556061adeaa8751b72 (diff) | |
download | talos-obmc-linux-971e9084beb50c0b244ff95ef2d888f7d158b8a8.tar.gz talos-obmc-linux-971e9084beb50c0b244ff95ef2d888f7d158b8a8.zip |
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 <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi-tegra114.c')
-rw-r--r-- | drivers/spi/spi-tegra114.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi-tegra114.c b/drivers/spi/spi-tegra114.c index 413c71843492..ead3ae89a08f 100644 --- a/drivers/spi/spi-tegra114.c +++ b/drivers/spi/spi-tegra114.c @@ -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 { |