X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=lib%2Fkobject.c;h=0d03252f87a8535db2a9fe00632560c6fa337f24;hb=2ad17defd596ca7e8ba782d5fc6950ee0e99513c;hp=1d63ead1815e4f5cb8aae5ea2d86a1541eed23a2;hpb=2ba14a017a4ba8d2266316f481d4ad7400073d18;p=linux-2.6-omap-h63xx.git diff --git a/lib/kobject.c b/lib/kobject.c index 1d63ead1815..0d03252f87a 100644 --- a/lib/kobject.c +++ b/lib/kobject.c @@ -153,6 +153,10 @@ static void kobject_init_internal(struct kobject *kobj) return; kref_init(&kobj->kref); INIT_LIST_HEAD(&kobj->entry); + kobj->state_in_sysfs = 0; + kobj->state_add_uevent_sent = 0; + kobj->state_remove_uevent_sent = 0; + kobj->state_initialized = 1; } @@ -289,13 +293,8 @@ void kobject_init(struct kobject *kobj, struct kobj_type *ktype) dump_stack(); } - kref_init(&kobj->kref); - INIT_LIST_HEAD(&kobj->entry); + kobject_init_internal(kobj); kobj->ktype = ktype; - kobj->state_in_sysfs = 0; - kobj->state_add_uevent_sent = 0; - kobj->state_remove_uevent_sent = 0; - kobj->state_initialized = 1; return; error: @@ -637,7 +636,7 @@ struct kobject *kobject_create(void) * @name: the name for the kset * @parent: the parent kobject of this kobject, if any. * - * This function creates a kset structure dynamically and registers it + * This function creates a kobject structure dynamically and registers it * with sysfs. When you are finished with this structure, call * kobject_put() and the structure will be dynamically freed when * it is no longer being used.