mmc: queue: use swap() in mmc_queue_thread()
authorFabian Frederick <fabf@skynet.be>
Wed, 10 Jun 2015 16:30:53 +0000 (18:30 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 15 Jun 2015 08:26:29 +0000 (10:26 +0200)
Use kernel.h macro definition.

Thanks to Julia Lawall for Coccinelle scripting support.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/card/queue.c

index 8efa3684aef849174ccef4053e049e3c95d8646f..d34e09b4161e66c1d757e9eabc6b9964c7a6fc14 100644 (file)
@@ -56,7 +56,6 @@ static int mmc_queue_thread(void *d)
        down(&mq->thread_sem);
        do {
                struct request *req = NULL;
-               struct mmc_queue_req *tmp;
                unsigned int cmd_flags = 0;
 
                spin_lock_irq(q->queue_lock);
@@ -86,9 +85,7 @@ static int mmc_queue_thread(void *d)
 
                        mq->mqrq_prev->brq.mrq.data = NULL;
                        mq->mqrq_prev->req = NULL;
-                       tmp = mq->mqrq_prev;
-                       mq->mqrq_prev = mq->mqrq_cur;
-                       mq->mqrq_cur = tmp;
+                       swap(mq->mqrq_prev, mq->mqrq_cur);
                } else {
                        if (kthread_should_stop()) {
                                set_current_state(TASK_RUNNING);