diff options
Diffstat (limited to 'block/blk-sysfs.c')
-rw-r--r-- | block/blk-sysfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index 304ec73ab821..b9a6ed166649 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c | |||
@@ -310,7 +310,7 @@ int blk_register_queue(struct gendisk *disk) | |||
310 | if (!q->request_fn) | 310 | if (!q->request_fn) |
311 | return 0; | 311 | return 0; |
312 | 312 | ||
313 | ret = kobject_add(&q->kobj, kobject_get(&disk->dev.kobj), | 313 | ret = kobject_add(&q->kobj, kobject_get(&disk_to_dev(disk)->kobj), |
314 | "%s", "queue"); | 314 | "%s", "queue"); |
315 | if (ret < 0) | 315 | if (ret < 0) |
316 | return ret; | 316 | return ret; |
@@ -339,6 +339,6 @@ void blk_unregister_queue(struct gendisk *disk) | |||
339 | 339 | ||
340 | kobject_uevent(&q->kobj, KOBJ_REMOVE); | 340 | kobject_uevent(&q->kobj, KOBJ_REMOVE); |
341 | kobject_del(&q->kobj); | 341 | kobject_del(&q->kobj); |
342 | kobject_put(&disk->dev.kobj); | 342 | kobject_put(&disk_to_dev(disk)->kobj); |
343 | } | 343 | } |
344 | } | 344 | } |