1 #ifndef __LINUX_KOBJECT_WRAPPER_H
2 #define __LINUX_KOBJECT_WRAPPER_H 1
4 #include_next <linux/kobject.h>
6 #include <linux/version.h>
7 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)
8 static inline int kobject_init_and_add(struct kobject *kobj,
9 struct kobj_type *ktype,
10 struct kobject *parent,
14 kobject_set_name(kobj, "%s", name);
17 kobj->parent = parent;
19 return kobject_add(kobj);
23 #endif /* linux/kobject.h wrapper */