Lines Matching full:foo

20  * Then tree kobjects are created and assigned to this kset, "foo", "baz",
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()
112 * The "foo" file where the .foo variable is read from and written to.
117 return sprintf(buf, "%d\n", foo_obj->foo); in foo_show()
123 sscanf(buf, "%du", &foo_obj->foo); in foo_store()
128 __ATTR(foo, 0666, foo_show, foo_store);
193 struct foo_obj *foo; in create_foo_obj() local
197 foo = kzalloc(sizeof(*foo), GFP_KERNEL); in create_foo_obj()
198 if (!foo) in create_foo_obj()
205 foo->kobj.kset = example_kset; in create_foo_obj()
213 retval = kobject_init_and_add(&foo->kobj, &foo_ktype, NULL, "%s", name); in create_foo_obj()
215 kobject_put(&foo->kobj); in create_foo_obj()
223 kobject_uevent(&foo->kobj, KOBJ_ADD); in create_foo_obj()
225 return foo; in create_foo_obj()
228 static void destroy_foo_obj(struct foo_obj *foo) in destroy_foo_obj() argument
230 kobject_put(&foo->kobj); in destroy_foo_obj()
246 foo_obj = create_foo_obj("foo"); in example_init()