diff options
Diffstat (limited to 'block/blk-sysfs.c')
-rw-r--r-- | block/blk-sysfs.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index 3ff9bba3379a..26f9ec28f56c 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c | |||
@@ -383,16 +383,21 @@ struct kobj_type blk_queue_ktype = { | |||
383 | int blk_register_queue(struct gendisk *disk) | 383 | int blk_register_queue(struct gendisk *disk) |
384 | { | 384 | { |
385 | int ret; | 385 | int ret; |
386 | struct device *dev = disk_to_dev(disk); | ||
386 | 387 | ||
387 | struct request_queue *q = disk->queue; | 388 | struct request_queue *q = disk->queue; |
388 | 389 | ||
389 | if (WARN_ON(!q)) | 390 | if (WARN_ON(!q)) |
390 | return -ENXIO; | 391 | return -ENXIO; |
391 | 392 | ||
393 | ret = blk_trace_init_sysfs(dev); | ||
394 | if (ret) | ||
395 | return ret; | ||
396 | |||
392 | if (!q->request_fn) | 397 | if (!q->request_fn) |
393 | return 0; | 398 | return 0; |
394 | 399 | ||
395 | ret = kobject_add(&q->kobj, kobject_get(&disk_to_dev(disk)->kobj), | 400 | ret = kobject_add(&q->kobj, kobject_get(&dev->kobj), |
396 | "%s", "queue"); | 401 | "%s", "queue"); |
397 | if (ret < 0) | 402 | if (ret < 0) |
398 | return ret; | 403 | return ret; |