]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - lib/kobject.c
[ARM] 4915/1: AT91: Update defconfigs (Part 2)
[linux-2.6-omap-h63xx.git] / lib / kobject.c
index 1d63ead1815e4f5cb8aae5ea2d86a1541eed23a2..0d03252f87a8535db2a9fe00632560c6fa337f24 100644 (file)
@@ -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.