This converts the code to use the new kobject functions, cleaning up the
logic in doing so.
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
 
        init_timer(&q->unplug_timer);
 
-       kobject_set_name(&q->kobj, "%s", "queue");
-       q->kobj.ktype = &queue_ktype;
-       kobject_init(&q->kobj);
+       kobject_init_ng(&q->kobj, &queue_ktype);
 
        mutex_init(&q->sysfs_lock);
 
        if (!q || !q->request_fn)
                return -ENXIO;
 
-       q->kobj.parent = kobject_get(&disk->dev.kobj);
-
-       ret = kobject_add(&q->kobj);
+       ret = kobject_add_ng(&q->kobj, kobject_get(&disk->dev.kobj),
+                            "%s", "queue");
        if (ret < 0)
                return ret;