aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2010-08-07 12:17:56 -0400
committerJens Axboe <jaxboe@fusionio.com>2010-08-07 12:17:56 -0400
commit33659ebbae262228eef4e0fe990f393d1f0ed941 (patch)
treefcb537f09359c8dad3a6f6e16dc4319562dc42cc /drivers/mtd
parent7e005f79791dcd58436c88ded4a7f5aed1b82147 (diff)
block: remove wrappers for request type/flags
Remove all the trivial wrappers for the cmd_type and cmd_flags fields in struct requests. This allows much easier grepping for different request types instead of unwinding through macros. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/mtd_blkdevs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c
index 03e19c1965cc..475af42745cb 100644
--- a/drivers/mtd/mtd_blkdevs.c
+++ b/drivers/mtd/mtd_blkdevs.c
@@ -73,14 +73,14 @@ static int do_blktrans_request(struct mtd_blktrans_ops *tr,
73 73
74 buf = req->buffer; 74 buf = req->buffer;
75 75
76 if (!blk_fs_request(req)) 76 if (req->cmd_type != REQ_TYPE_FS)
77 return -EIO; 77 return -EIO;
78 78
79 if (blk_rq_pos(req) + blk_rq_cur_sectors(req) > 79 if (blk_rq_pos(req) + blk_rq_cur_sectors(req) >
80 get_capacity(req->rq_disk)) 80 get_capacity(req->rq_disk))
81 return -EIO; 81 return -EIO;
82 82
83 if (blk_discard_rq(req)) 83 if (req->cmd_flags & REQ_DISCARD)
84 return tr->discard(dev, block, nsect); 84 return tr->discard(dev, block, nsect);
85 85
86 switch(rq_data_dir(req)) { 86 switch(rq_data_dir(req)) {