diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2007-12-20 02:09:39 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-01-24 20:40:40 -0800 |
commit | af5ca3f4ec5cc4432a42a73b050dd8898ce8fd00 (patch) | |
tree | 3e5a3081b2802547f10da72c0026b4929d0e287b /include/linux/kobject.h | |
parent | 528a4bf1d5ffed310d26fc1d82d45c02949f71cf (diff) | |
download | blackbird-op-linux-af5ca3f4ec5cc4432a42a73b050dd8898ce8fd00.tar.gz blackbird-op-linux-af5ca3f4ec5cc4432a42a73b050dd8898ce8fd00.zip |
Driver core: change sysdev classes to use dynamic kobject names
All kobjects require a dynamically allocated name now. We no longer
need to keep track if the name is statically assigned, we can just
unconditionally free() all kobject names on cleanup.
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/kobject.h')
-rw-r--r-- | include/linux/kobject.h | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index 504ac0eb4412..4adbe1d83081 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h @@ -61,7 +61,7 @@ enum kobject_action { }; struct kobject { - const char * k_name; + const char *name; struct kref kref; struct list_head entry; struct kobject * parent; @@ -69,7 +69,6 @@ struct kobject { struct kobj_type * ktype; struct sysfs_dirent * sd; unsigned int state_initialized:1; - unsigned int state_name_set:1; unsigned int state_in_sysfs:1; unsigned int state_add_uevent_sent:1; unsigned int state_remove_uevent_sent:1; @@ -80,7 +79,7 @@ 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 *kobj, struct kobj_type *ktype); @@ -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 */ |