diff options
author | Fabian Frederick <fabf@skynet.be> | 2015-06-10 18:30:53 +0200 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2015-06-15 10:26:29 +0200 |
commit | 7551847ca079c362663385be20e6731ad32f1a3e (patch) | |
tree | 455255031c04d0db34b6257b1d200b58dfa7ead5 /drivers/mmc | |
parent | mmc: dw_mmc: insmod followed by rmmod will hung for eMMC (diff) | |
download | linux-7551847ca079c362663385be20e6731ad32f1a3e.tar.xz linux-7551847ca079c362663385be20e6731ad32f1a3e.zip |
mmc: queue: use swap() in mmc_queue_thread()
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>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/card/queue.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c index 8efa3684aef8..d34e09b4161e 100644 --- a/drivers/mmc/card/queue.c +++ b/drivers/mmc/card/queue.c @@ -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); |