aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-sysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/blk-sysfs.c')
-rw-r--r--block/blk-sysfs.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
index 9337e17f9110..b1cd04087d6a 100644
--- a/block/blk-sysfs.c
+++ b/block/blk-sysfs.c
@@ -422,14 +422,18 @@ struct kobj_type blk_queue_ktype = {
422int blk_register_queue(struct gendisk *disk) 422int blk_register_queue(struct gendisk *disk)
423{ 423{
424 int ret; 424 int ret;
425 struct device *dev = disk_to_dev(disk);
425 426
426 struct request_queue *q = disk->queue; 427 struct request_queue *q = disk->queue;
427 428
428 if (WARN_ON(!q)) 429 if (WARN_ON(!q))
429 return -ENXIO; 430 return -ENXIO;
430 431
431 ret = kobject_add(&q->kobj, kobject_get(&disk_to_dev(disk)->kobj), 432 ret = blk_trace_init_sysfs(dev);
432 "%s", "queue"); 433 if (ret)
434 return ret;
435
436 ret = kobject_add(&q->kobj, kobject_get(&dev->kobj), "%s", "queue");
433 if (ret < 0) 437 if (ret < 0)
434 return ret; 438 return ret;
435 439