mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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 <[email protected]>
This commit is contained in:
parent
fb1be43301
commit
49fd524f95
2 changed files with 10 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue