]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/mmc/card/block.c
drivers: use req op accessor
[karo-tx-linux.git] / drivers / mmc / card / block.c
index e62fde3ac431c111ec945d4aba9c877f6308d81d..201a8719f6c417473b3e9ee70752d8e6fb58645a 100644 (file)
@@ -1722,8 +1722,7 @@ static u8 mmc_blk_prep_packed_list(struct mmc_queue *mq, struct request *req)
                    !IS_ALIGNED(blk_rq_sectors(next), 8))
                        break;
 
-               if (next->cmd_flags & REQ_DISCARD ||
-                   next->cmd_flags & REQ_FLUSH)
+               if (req_op(next) == REQ_OP_DISCARD || next->cmd_flags & REQ_FLUSH)
                        break;
 
                if (rq_data_dir(cur) != rq_data_dir(next))
@@ -2164,7 +2163,7 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req)
        }
 
        mq->flags &= ~MMC_QUEUE_NEW_REQUEST;
-       if (cmd_flags & REQ_DISCARD) {
+       if (req && req_op(req) == REQ_OP_DISCARD) {
                /* complete ongoing async transfer before issuing discard */
                if (card->host->areq)
                        mmc_blk_issue_rw_rq(mq, NULL);
@@ -2188,7 +2187,7 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req)
 
 out:
        if ((!req && !(mq->flags & MMC_QUEUE_NEW_REQUEST)) ||
-            (cmd_flags & MMC_REQ_SPECIAL_MASK))
+           mmc_req_is_special(req))
                /*
                 * Release host when there are no more requests
                 * and after special request(discard, flush) is done.