blk-mq: register device instead of disk

Enable devices without a gendisk instance to register itself with blk-mq
and expose the associated multi-queue sysfs entries.

Signed-off-by: Matias Bjørling <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
Matias Bjørling 2016-09-16 14:25:06 +02:00 • committed by Jens Axboe
commit b21d5b3017
4 changed files with 12 additions and 15 deletions

View file

@ -704,7 +704,7 @@ int blk_register_queue(struct gendisk *disk)
kobject_uevent(&q->kobj, KOBJ_ADD);
if (q->mq_ops)
blk_mq_register_disk(disk);
blk_mq_register_dev(dev, q);
if (!q->request_fn)
return 0;
@ -729,7 +729,7 @@ void blk_unregister_queue(struct gendisk *disk)
return;
if (q->mq_ops)
blk_mq_unregister_disk(disk);
blk_mq_unregister_dev(disk_to_dev(disk), q);
if (q->request_fn)
elv_unregister_queue(q);