summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/kobject.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index e744a55d07d5..42174b623637 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -24,6 +24,7 @@
#define KOBJ_NAME_LEN 20
struct kobject {
+ char * k_name;
char name[KOBJ_NAME_LEN];
atomic_t refcount;
struct list_head entry;
@@ -33,6 +34,14 @@ struct kobject {
struct dentry * dentry;
};
+extern int kobject_set_name(struct kobject *, const char *, ...)
+ __attribute__((format(printf,2,3)));
+
+static inline char * kobject_name(struct kobject * kobj)
+{
+ return kobj->k_name;
+}
+
extern void kobject_init(struct kobject *);
extern void kobject_cleanup(struct kobject *);