From a89e2d2754246645959f1a2f91e37e9b367bfd36 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Thu, 9 Jan 2014 16:03:58 +0800 Subject: [PATCH] spi: core: Use list_first_entry to extract head of queue For slightly better readability. Signed-off-by: Axel Lin Signed-off-by: Mark Brown --- drivers/spi/spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 401cd66770f9..36bfa7f820a6 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) -- 2.39.5