diff options
author | Jens Axboe <axboe@fb.com> | 2014-04-16 18:57:18 +0200 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-04-16 22:15:46 +0200 |
commit | 49fd524f95cb4cc699d435e0ebb08b1c6220da6d (patch) | |
tree | 1e9c2d2bdc14a6acaaf57b2f127fadea81528aec /block/bsg.c | |
parent | jsflash: missed conversion from rq->buffer to bio_data(rq->bio) (diff) | |
download | linux-49fd524f95cb4cc699d435e0ebb08b1c6220da6d.tar.xz linux-49fd524f95cb4cc699d435e0ebb08b1c6220da6d.zip |
bsg: update check for rq based driver for blk-mq
bsg currently checks ->request_fn to check whether a queue can
handle struct request. But with blk-mq, we don't have a request_fn
yet are request based. Add a queue_is_rq_based() helper and use
that in bsg, I'm guessing this is not the last place we need to
update for this. Besides, it better explains what is being
checked.
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/bsg.c')
-rw-r--r-- | block/bsg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/bsg.c b/block/bsg.c index 420a5a9f1b23..e5214c148096 100644 --- a/block/bsg.c +++ b/block/bsg.c @@ -1008,7 +1008,7 @@ int bsg_register_queue(struct request_queue *q, struct device *parent, /* * we need a proper transport to send commands, not a stacked device */ - if (!q->request_fn) + if (!queue_is_rq_based(q)) return 0; bcd = &q->bsg_dev; |