Skip to content

Commit

Permalink
mmc: queue: use swap() in mmc_queue_thread()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fabian Frederick authored and Ulf Hansson committed Jun 15, 2015
1 parent 048fd7e commit 7551847
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/mmc/card/queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 7551847

Please sign in to comment.