Lines Matching refs:foo
33 int foo; member
42 ssize_t (*show)(struct foo_obj *foo, struct foo_attribute *attr, char *buf);
43 ssize_t (*store)(struct foo_obj *foo, struct foo_attribute *attr, const char *buf, size_t count);
59 struct foo_obj *foo; in foo_attr_show() local
62 foo = to_foo_obj(kobj); in foo_attr_show()
67 return attribute->show(foo, attribute, buf); in foo_attr_show()
79 struct foo_obj *foo; in foo_attr_store() local
82 foo = to_foo_obj(kobj); in foo_attr_store()
87 return attribute->store(foo, attribute, buf, len); in foo_attr_store()
105 struct foo_obj *foo; in foo_release() local
107 foo = to_foo_obj(kobj); in foo_release()
108 kfree(foo); in foo_release()
117 return sprintf(buf, "%d\n", foo_obj->foo); in foo_show()
125 ret = kstrtoint(buf, 10, &foo_obj->foo); in foo_store()
134 __ATTR(foo, 0664, foo_show, foo_store);
202 struct foo_obj *foo; in create_foo_obj() local
206 foo = kzalloc(sizeof(*foo), GFP_KERNEL); in create_foo_obj()
207 if (!foo) in create_foo_obj()
214 foo->kobj.kset = example_kset; in create_foo_obj()
222 retval = kobject_init_and_add(&foo->kobj, &foo_ktype, NULL, "%s", name); in create_foo_obj()
224 kobject_put(&foo->kobj); in create_foo_obj()
232 kobject_uevent(&foo->kobj, KOBJ_ADD); in create_foo_obj()
234 return foo; in create_foo_obj()
237 static void destroy_foo_obj(struct foo_obj *foo) in destroy_foo_obj() argument
239 kobject_put(&foo->kobj); in destroy_foo_obj()