Skip to content

Commit 41b7574

Browse files
johnpgarrymartinkpetersen
authored andcommitted
scsi: bsg: Pass dev to blk_mq_alloc_queue()
When calling bsg_setup_queue() -> blk_mq_alloc_queue(), we don't pass the dev as the queuedata, but rather manually set it afterwards. Just pass dev to blk_mq_alloc_queue() to have automatically set. Signed-off-by: John Garry <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Tested-by: Himanshu Madhani <[email protected]> Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent e7c09df commit 41b7574

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

block/bsg-lib.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,13 +385,12 @@ struct request_queue *bsg_setup_queue(struct device *dev, const char *name,
385385
if (blk_mq_alloc_tag_set(set))
386386
goto out_tag_set;
387387

388-
q = blk_mq_alloc_queue(set, lim, NULL);
388+
q = blk_mq_alloc_queue(set, lim, dev);
389389
if (IS_ERR(q)) {
390390
ret = PTR_ERR(q);
391391
goto out_queue;
392392
}
393393

394-
q->queuedata = dev;
395394
blk_queue_rq_timeout(q, BLK_DEFAULT_SG_TIMEOUT);
396395

397396
bset->bd = bsg_register_queue(q, dev, name, bsg_transport_sg_io_fn);

0 commit comments

Comments
 (0)