Lines Matching full:foo

18  * Then tree kobjects are created and assigned to this kset, "foo", "baz",
31 int foo; member
40 ssize_t (*show)(struct foo_obj *foo, struct foo_attribute *attr, char *buf);
41 ssize_t (*store)(struct foo_obj *foo, struct foo_attribute *attr, const char *buf, size_t count);
57 struct foo_obj *foo; in foo_attr_show() local
60 foo = to_foo_obj(kobj); in foo_attr_show()
65 return attribute->show(foo, attribute, buf); in foo_attr_show()
77 struct foo_obj *foo; in foo_attr_store() local
80 foo = to_foo_obj(kobj); in foo_attr_store()
85 return attribute->store(foo, attribute, buf, len); in foo_attr_store()
103 struct foo_obj *foo; in foo_release() local
105 foo = to_foo_obj(kobj); in foo_release()
106 kfree(foo); in foo_release()
110 * The "foo" file where the .foo variable is read from and written to.
115 return sysfs_emit(buf, "%d\n", foo_obj->foo); in foo_show()
123 ret = kstrtoint(buf, 10, &foo_obj->foo); in foo_store()
132 __ATTR(foo, 0664, foo_show, foo_store);
201 struct foo_obj *foo; in create_foo_obj() local
205 foo = kzalloc(sizeof(*foo), GFP_KERNEL); in create_foo_obj()
206 if (!foo) in create_foo_obj()
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()
223 kobject_put(&foo->kobj); in create_foo_obj()
231 kobject_uevent(&foo->kobj, KOBJ_ADD); in create_foo_obj()
233 return foo; in create_foo_obj()
236 static void destroy_foo_obj(struct foo_obj *foo) in destroy_foo_obj() argument
238 kobject_put(&foo->kobj); in destroy_foo_obj()
254 foo_obj = create_foo_obj("foo"); in example_init()