* [PATCH] spi: tegra114: Use list_is_last() instead of open-coded
@ 2014-01-15 6:07 Axel Lin
2014-01-27 20:29 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2014-01-15 6:07 UTC (permalink / raw)
To: Mark Brown; +Cc: Laxman Dewangan, linux-spi-u79uwXL29TY76Z2rM5mHXA
For better readability, and then we can remove the comment for last transfer.
Signed-off-by: Axel Lin <axel.lin-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org>
---
drivers/spi/spi-tegra114.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/spi/spi-tegra114.c b/drivers/spi/spi-tegra114.c
index 413c718..ead3ae8 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 {
--
1.8.1.2
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] spi: tegra114: Use list_is_last() instead of open-coded
2014-01-15 6:07 [PATCH] spi: tegra114: Use list_is_last() instead of open-coded Axel Lin
@ 2014-01-27 20:29 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2014-01-27 20:29 UTC (permalink / raw)
To: Axel Lin; +Cc: Laxman Dewangan, linux-spi-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 156 bytes --]
On Wed, Jan 15, 2014 at 02:07:04PM +0800, Axel Lin wrote:
> For better readability, and then we can remove the comment for last transfer.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-01-27 20:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-15 6:07 [PATCH] spi: tegra114: Use list_is_last() instead of open-coded Axel Lin
2014-01-27 20:29 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.