diff mbox

spi: core: Use list_first_entry to extract head of queue

Message ID 1389254638.31143.1.camel@phoenix (mailing list archive)
State Accepted
Commit a89e2d2754246645959f1a2f91e37e9b367bfd36
Headers show

Commit Message

Axel Lin Jan. 9, 2014, 8:03 a.m. UTC
For slightly better readability.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/spi/spi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mark Brown Jan. 9, 2014, 1:54 p.m. UTC | #1
On Thu, Jan 09, 2014 at 04:03:58PM +0800, Axel Lin wrote:
> For slightly better readability.
> 
> Signed-off-by: Axel Lin <axel.lin@ingics.com>

Applied, thanks.
diff mbox

Patch

diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index f360525e..eccf5a7 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -685,7 +685,7 @@  static void spi_pump_messages(struct kthread_work *work)
 	}
 	/* Extract head of queue */
 	master->cur_msg =
-	    list_entry(master->queue.next, struct spi_message, queue);
+		list_first_entry(&master->queue, struct spi_message, queue);
 
 	list_del_init(&master->cur_msg->queue);
 	if (master->busy)