spi: core: Use list_first_entry to extract head of queue
authorAxel Lin <axel.lin@ingics.com>
Thu, 9 Jan 2014 08:03:58 +0000 (16:03 +0800)
committerMark Brown <broonie@linaro.org>
Thu, 9 Jan 2014 13:54:07 +0000 (13:54 +0000)
For slightly better readability.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/spi/spi.c

index 401cd66..36bfa7f 100644 (file)
@@ -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)