diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2017-02-01 15:47:56 +0300 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2017-02-13 15:21:00 +0300 |
commit | 9491be5ff06ff08d61e6a8d767382ea0037a6f38 (patch) | |
tree | d759768390b4541401cd683bdfc12c04f02a7df0 /drivers/mmc/core/block.c | |
parent | 74f5ba357c7cd63c664e65fb7a116dbc0538a2ec (diff) | |
download | linux-9491be5ff06ff08d61e6a8d767382ea0037a6f38.tar.xz |
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/block.c')
-rw-r--r-- | drivers/mmc/core/block.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c index 2a3e9e678a23..7f0b9af8229c 100644 --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c @@ -1663,7 +1663,7 @@ static void mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *new_req) * complete. */ if (status == MMC_BLK_NEW_REQUEST) - mq->flags |= MMC_QUEUE_NEW_REQUEST; + mq->new_request = true; return; } @@ -1802,7 +1802,7 @@ void mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) goto out; } - mq->flags &= ~MMC_QUEUE_NEW_REQUEST; + mq->new_request = false; if (req && req_op(req) == REQ_OP_DISCARD) { /* complete ongoing async transfer before issuing discard */ if (card->host->areq) @@ -1823,7 +1823,7 @@ void mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) } out: - if ((!req && !(mq->flags & MMC_QUEUE_NEW_REQUEST)) || req_is_special) + if ((!req && !mq->new_request) || req_is_special) /* * Release host when there are no more requests * and after special request(discard, flush) is done. |