Skip to content

Commit a89e2d2

Browse files
AxelLinbroonie
authored andcommitted
spi: core: Use list_first_entry to extract head of queue
For slightly better readability. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
1 parent 1cfd97f commit a89e2d2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/spi/spi.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ static void spi_pump_messages(struct kthread_work *work)
685685
}
686686
/* Extract head of queue */
687687
master->cur_msg =
688-
list_entry(master->queue.next, struct spi_message, queue);
688+
list_first_entry(&master->queue, struct spi_message, queue);
689689

690690
list_del_init(&master->cur_msg->queue);
691691
if (master->busy)

0 commit comments

Comments
 (0)