]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/kobject.h
Driver core: change sysdev classes to use dynamic kobject names
[linux-2.6-omap-h63xx.git] / include / linux / kobject.h
index 8b0aa715fa2f7981f7e1fe8e2b2d8d2ac3b8d4bf..4adbe1d830810cdc77ebe59633f46da2d17c1221 100644 (file)
@@ -61,13 +61,17 @@ enum kobject_action {
 };
 
 struct kobject {
-       const char              * k_name;
+       const char              *name;
        struct kref             kref;
        struct list_head        entry;
        struct kobject          * parent;
        struct kset             * kset;
        struct kobj_type        * ktype;
        struct sysfs_dirent     * sd;
+       unsigned int state_initialized:1;
+       unsigned int state_in_sysfs:1;
+       unsigned int state_add_uevent_sent:1;
+       unsigned int state_remove_uevent_sent:1;
 };
 
 extern int kobject_set_name(struct kobject *, const char *, ...)
@@ -75,14 +79,13 @@ extern int kobject_set_name(struct kobject *, const char *, ...)
 
 static inline const char * kobject_name(const struct kobject * kobj)
 {
-       return kobj->k_name;
+       return kobj->name;
 }
 
-extern void kobject_init(struct kobject *);
-extern void kobject_init_ng(struct kobject *kobj, struct kobj_type *ktype);
-extern int __must_check kobject_add_ng(struct kobject *kobj,
-                                      struct kobject *parent,
-                                      const char *fmt, ...);
+extern void kobject_init(struct kobject *kobj, struct kobj_type *ktype);
+extern int __must_check kobject_add(struct kobject *kobj,
+                                   struct kobject *parent,
+                                   const char *fmt, ...);
 extern int __must_check kobject_init_and_add(struct kobject *kobj,
                                             struct kobj_type *ktype,
                                             struct kobject *parent,
@@ -97,9 +100,6 @@ extern struct kobject * __must_check kobject_create_and_add(const char *name,
 extern int __must_check kobject_rename(struct kobject *, const char *new_name);
 extern int __must_check kobject_move(struct kobject *, struct kobject *);
 
-extern int __must_check kobject_register(struct kobject *);
-extern void kobject_unregister(struct kobject *);
-
 extern struct kobject * kobject_get(struct kobject *);
 extern void kobject_put(struct kobject *);
 
@@ -160,7 +160,6 @@ struct kset {
 };
 
 extern void kset_init(struct kset * k);
-extern int __must_check kset_add(struct kset * k);
 extern int __must_check kset_register(struct kset * k);
 extern void kset_unregister(struct kset * k);
 extern struct kset * __must_check kset_create_and_add(const char *name,
@@ -189,14 +188,6 @@ static inline struct kobj_type *get_ktype(struct kobject *kobj)
 
 extern struct kobject * kset_find_obj(struct kset *, const char *);
 
-
-/*
- * Use this when initializing an embedded kset with no other 
- * fields to initialize.
- */
-#define set_kset_name(str)     .kset = { .kobj = { .k_name = str } }
-
-
 /* The global /sys/kernel/ kobject for people to chain off of */
 extern struct kobject *kernel_kobj;
 /* The global /sys/hypervisor/ kobject for people to chain off of */