diff options
Diffstat (limited to 'block')
-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 73f36beff5cd..8653d710b39e 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c | |||
@@ -387,16 +387,21 @@ struct kobj_type blk_queue_ktype = { | |||
387 | int blk_register_queue(struct gendisk *disk) | 387 | int blk_register_queue(struct gendisk *disk) |
388 | { | 388 | { |
389 | int ret; | 389 | int ret; |
390 | struct device *dev = disk_to_dev(disk); | ||
390 | 391 | ||
391 | struct request_queue *q = disk->queue; | 392 | struct request_queue *q = disk->queue; |
392 | 393 | ||
393 | if (WARN_ON(!q)) | 394 | if (WARN_ON(!q)) |
394 | return -ENXIO; | 395 | return -ENXIO; |
395 | 396 | ||
397 | ret = blk_trace_init_sysfs(dev); | ||
398 | if (ret) | ||
399 | return ret; | ||
400 | |||
396 | if (!q->request_fn) | 401 | if (!q->request_fn) |
397 | return 0; | 402 | return 0; |
398 | 403 | ||
399 | ret = kobject_add(&q->kobj, kobject_get(&disk_to_dev(disk)->kobj), | 404 | ret = kobject_add(&q->kobj, kobject_get(&dev->kobj), |
400 | "%s", "queue"); | 405 | "%s", "queue"); |
401 | if (ret < 0) | 406 | if (ret < 0) |
402 | return ret; | 407 | return ret; |