Home
last modified time | relevance | path

Searched refs:kobj (Results 1 – 5 of 5) sorted by relevance

/samples/kobject/
Dkset-example.c30 struct kobject kobj; member
35 #define to_foo_obj(x) container_of(x, struct foo_obj, kobj)
52 static ssize_t foo_attr_show(struct kobject *kobj, in foo_attr_show() argument
60 foo = to_foo_obj(kobj); in foo_attr_show()
72 static ssize_t foo_attr_store(struct kobject *kobj, in foo_attr_store() argument
80 foo = to_foo_obj(kobj); in foo_attr_store()
101 static void foo_release(struct kobject *kobj) in foo_release() argument
105 foo = to_foo_obj(kobj); in foo_release()
213 foo->kobj.kset = example_kset; in create_foo_obj()
221 retval = kobject_init_and_add(&foo->kobj, &foo_ktype, NULL, "%s", name); in create_foo_obj()
[all …]
Dkobject-example.c28 static ssize_t foo_show(struct kobject *kobj, struct kobj_attribute *attr, in foo_show() argument
34 static ssize_t foo_store(struct kobject *kobj, struct kobj_attribute *attr, in foo_store() argument
54 static ssize_t b_show(struct kobject *kobj, struct kobj_attribute *attr, in b_show() argument
66 static ssize_t b_store(struct kobject *kobj, struct kobj_attribute *attr, in b_store() argument
/samples/vfio-mdev/
Dmdpy.c102 static const struct mdpy_type *mdpy_find_type(struct kobject *kobj) in mdpy_find_type() argument
107 if (strcmp(mdpy_types[i].name, kobj->name) == 0) in mdpy_find_type()
229 static int mdpy_create(struct kobject *kobj, struct mdev_device *mdev) in mdpy_create() argument
231 const struct mdpy_type *type = mdpy_find_type(kobj); in mdpy_create()
260 __func__, kobj->name, type->width, type->height); in mdpy_create()
667 name_show(struct kobject *kobj, struct device *dev, char *buf) in name_show() argument
669 return sprintf(buf, "%s\n", kobj->name); in name_show()
674 description_show(struct kobject *kobj, struct device *dev, char *buf) in description_show() argument
676 const struct mdpy_type *type = mdpy_find_type(kobj); in description_show()
685 available_instances_show(struct kobject *kobj, struct device *dev, char *buf) in available_instances_show() argument
[all …]
Dmbochs.c208 static const struct mbochs_type *mbochs_find_type(struct kobject *kobj) in mbochs_find_type() argument
213 if (strcmp(mbochs_types[i].name, kobj->name) == 0) in mbochs_find_type()
519 static int mbochs_create(struct kobject *kobj, struct mdev_device *mdev) in mbochs_create() argument
521 const struct mbochs_type *type = mbochs_find_type(kobj); in mbochs_create()
547 kobj->name, type->mbytes, mdev_state->pagecount); in mbochs_create()
1358 name_show(struct kobject *kobj, struct device *dev, char *buf) in name_show() argument
1360 return sprintf(buf, "%s\n", kobj->name); in name_show()
1365 description_show(struct kobject *kobj, struct device *dev, char *buf) in description_show() argument
1367 const struct mbochs_type *type = mbochs_find_type(kobj); in description_show()
1375 available_instances_show(struct kobject *kobj, struct device *dev, char *buf) in available_instances_show() argument
[all …]
Dmtty.c711 static int mtty_create(struct kobject *kobj, struct mdev_device *mdev) in mtty_create() argument
723 if (!strcmp(kobj->name, name)) { in mtty_create()
1312 name_show(struct kobject *kobj, struct device *dev, char *buf) in name_show() argument
1321 if (!strcmp(kobj->name, name)) in name_show()
1331 available_instances_show(struct kobject *kobj, struct device *dev, char *buf) in available_instances_show() argument
1341 if (!strcmp(kobj->name, name)) { in available_instances_show()
1359 static ssize_t device_api_show(struct kobject *kobj, struct device *dev, in device_api_show() argument