summaryrefslogtreecommitdiff
path: root/block/blk-sysfs.c
diff options
context:
space:
mode:
authorMatias Bjørling <m@bjorling.me>2016-09-16 14:25:06 +0200
committerJens Axboe <axboe@fb.com>2016-09-21 07:56:16 -0600
commitb21d5b301794ae332eaa6e177d71fe8b77d3664c (patch)
tree338c8338e49341229936f0a38c1d58841f664ff6 /block/blk-sysfs.c
parent9ae2d0aa5046c67dd37cf4b70998ad296e718835 (diff)
downloadlwn-b21d5b301794ae332eaa6e177d71fe8b77d3664c.tar.gz
lwn-b21d5b301794ae332eaa6e177d71fe8b77d3664c.zip
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 <m@bjorling.me> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-sysfs.c')
-rw-r--r--block/blk-sysfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
index f87a7e747d36..9cc8d7c5439a 100644
--- a/block/blk-sysfs.c
+++ b/block/blk-sysfs.c
@@ -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);