projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
29e3dd0
)
Kobject: convert block/ll_rw_blk.c to use kobject_init/add_ng()
author
Greg Kroah-Hartman
<
[email protected]
>
Tue, 18 Dec 2007 06:05:35 +0000
(23:05 -0700)
committer
Greg Kroah-Hartman
<
[email protected]
>
Fri, 25 Jan 2008 04:40:36 +0000
(20:40 -0800)
This converts the code to use the new kobject functions, cleaning up the
logic in doing so.
Cc: Jens Axboe <
[email protected]
>
Cc: Kay Sievers <
[email protected]
>
Signed-off-by: Greg Kroah-Hartman <
[email protected]
>
block/ll_rw_blk.c
patch
|
blob
|
history
diff --git
a/block/ll_rw_blk.c
b/block/ll_rw_blk.c
index 3887b2a33ed0e348f6d0ef1c8dded7f8e26e7787..8054b7d8e07ca362582a14a7c5df48dcc1fecd53 100644
(file)
--- a/
block/ll_rw_blk.c
+++ b/
block/ll_rw_blk.c
@@
-1862,9
+1862,7
@@
struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id)
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);
@@
-4182,9
+4180,8
@@
int blk_register_queue(struct gendisk *disk)
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;