summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-dw.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2014-02-12 18:13:27 +0400
committerMark Brown <broonie@linaro.org>2014-02-23 07:47:07 +0400
commit23e2c2aa45a213ea25636ac5add66c2507e7361b (patch)
tree6f246f62a4652b71c28151d158a96dbe4925b8b3 /drivers/spi/spi-dw.c
parent38dbfb59d1175ef458d006556061adeaa8751b72 (diff)
downloadlinux-23e2c2aa45a213ea25636ac5add66c2507e7361b.tar.xz
spi: Use list_last_entry at appropriate places
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi-dw.c')
-rw-r--r--drivers/spi/spi-dw.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c
index bf98d63d92b3..390da9bf2d84 100644
--- a/drivers/spi/spi-dw.c
+++ b/drivers/spi/spi-dw.c
@@ -276,8 +276,7 @@ static void giveback(struct dw_spi *dws)
queue_work(dws->workqueue, &dws->pump_messages);
spin_unlock_irqrestore(&dws->lock, flags);
- last_transfer = list_entry(msg->transfers.prev,
- struct spi_transfer,
+ last_transfer = list_last_entry(&msg->transfers, struct spi_transfer,
transfer_list);
if (!last_transfer->cs_change && dws->cs_control)