diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2017-02-01 13:47:56 +0100 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2017-02-13 13:21:00 +0100 |
commit | 9491be5ff06ff08d61e6a8d767382ea0037a6f38 (patch) | |
tree | d759768390b4541401cd683bdfc12c04f02a7df0 /drivers/mmc/core/queue.c | |
parent | 74f5ba357c7cd63c664e65fb7a116dbc0538a2ec (diff) | |
download | op-kernel-dev-9491be5ff06ff08d61e6a8d767382ea0037a6f38.zip op-kernel-dev-9491be5ff06ff08d61e6a8d767382ea0037a6f38.tar.gz |
mmc: queue: turn queue flags into bools
Instead of masking and setting two bits in the "flags" field
for the mmc_queue, just use two bools named "suspended" and
"new_request".
The masking and setting would likely have race conditions
anyways, it is better to use a simple member like this.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/core/queue.c')
-rw-r--r-- | drivers/mmc/core/queue.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/mmc/core/queue.c b/drivers/mmc/core/queue.c index 611f5c6..5cb369c 100644 --- a/drivers/mmc/core/queue.c +++ b/drivers/mmc/core/queue.c @@ -86,8 +86,8 @@ static int mmc_queue_thread(void *d) set_current_state(TASK_RUNNING); mmc_blk_issue_rq(mq, req); cond_resched(); - if (mq->flags & MMC_QUEUE_NEW_REQUEST) { - mq->flags &= ~MMC_QUEUE_NEW_REQUEST; + if (mq->new_request) { + mq->new_request = false; continue; /* fetch again */ } @@ -401,8 +401,8 @@ void mmc_queue_suspend(struct mmc_queue *mq) struct request_queue *q = mq->queue; unsigned long flags; - if (!(mq->flags & MMC_QUEUE_SUSPENDED)) { - mq->flags |= MMC_QUEUE_SUSPENDED; + if (!mq->suspended) { + mq->suspended |= true; spin_lock_irqsave(q->queue_lock, flags); blk_stop_queue(q); @@ -421,8 +421,8 @@ void mmc_queue_resume(struct mmc_queue *mq) struct request_queue *q = mq->queue; unsigned long flags; - if (mq->flags & MMC_QUEUE_SUSPENDED) { - mq->flags &= ~MMC_QUEUE_SUSPENDED; + if (mq->suspended) { + mq->suspended = false; up(&mq->thread_sem); |