2
0
mirror of https://github.com/openvswitch/ovs synced 2025-09-05 16:55:42 +00:00
Files
ovs/datapath/linux-2.6/compat-2.6/include/linux/kobject.h

24 lines
523 B
C
Raw Normal View History

#ifndef __LINUX_KOBJECT_WRAPPER_H
#define __LINUX_KOBJECT_WRAPPER_H 1
#include_next <linux/kobject.h>
#include <linux/version.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)
static inline int kobject_init_and_add(struct kobject *kobj,
struct kobj_type *ktype,
struct kobject *parent,
const char *name)
{
kobject_init(kobj);
kobject_set_name(kobj, "%s", name);
kobj->ktype = ktype;
kobj->kset = NULL;
kobj->parent = parent;
return kobject_add(kobj);
}
#endif
#endif /* linux/kobject.h wrapper */