X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Flinux%2Fkobject.h;h=331d25b9cc4149ed9fbf05144c36802957647c68;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=6360d225884c054259816bd778c3b2fa9c4077c5;hpb=a2c21200f1c81b08cb55e417b68150bba439b646;p=linux-2.6.git diff --git a/include/linux/kobject.h b/include/linux/kobject.h index 6360d2258..331d25b9c 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h @@ -12,13 +12,16 @@ * destructors. */ -#if defined(__KERNEL__) && !defined(_KOBJECT_H_) +#ifndef _KOBJECT_H_ #define _KOBJECT_H_ +#ifdef __KERNEL__ + #include #include #include #include +#include #include #define KOBJ_NAME_LEN 20 @@ -26,7 +29,7 @@ struct kobject { char * k_name; char name[KOBJ_NAME_LEN]; - atomic_t refcount; + struct kref kref; struct list_head entry; struct kobject * parent; struct kset * kset; @@ -58,6 +61,8 @@ extern void kobject_put(struct kobject *); extern void kobject_hotplug(const char *action, struct kobject *); +extern char * kobject_get_path(struct kset *, struct kobject *, int); + struct kobj_type { void (*release)(struct kobject *); struct sysfs_ops * sysfs_ops; @@ -229,5 +234,5 @@ struct subsys_attribute { extern int subsys_create_file(struct subsystem * , struct subsys_attribute *); extern void subsys_remove_file(struct subsystem * , struct subsys_attribute *); - +#endif /* __KERNEL__ */ #endif /* _KOBJECT_H_ */