From: Axel Lin Date: Thu, 9 Jan 2014 08:03:58 +0000 (+0800) Subject: spi: core: Use list_first_entry to extract head of queue X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a89e2d2754246645959f1a2f91e37e9b367bfd36;p=linux-beck.git 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 --- 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)