* destructors.
*/
-#if defined(__KERNEL__) && !defined(_KOBJECT_H_)
+#ifndef _KOBJECT_H_
#define _KOBJECT_H_
+#ifdef __KERNEL__
+
#include <linux/types.h>
#include <linux/list.h>
#include <linux/sysfs.h>
#include <linux/rwsem.h>
+#include <linux/kref.h>
#include <asm/atomic.h>
#define KOBJ_NAME_LEN 20
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;
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;
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_ */