Lines Matching refs:foo
31 int foo; member
40 ssize_t (*show)(struct foo_obj *foo, const struct foo_attribute *attr, char *buf);
41 ssize_t (*store)(struct foo_obj *foo, const struct foo_attribute *attr,
58 struct foo_obj *foo; in foo_attr_show() local
61 foo = to_foo_obj(kobj); in foo_attr_show()
66 return attribute->show(foo, attribute, buf); in foo_attr_show()
78 struct foo_obj *foo; in foo_attr_store() local
81 foo = to_foo_obj(kobj); in foo_attr_store()
86 return attribute->store(foo, attribute, buf, len); in foo_attr_store()
104 struct foo_obj *foo; in foo_release() local
106 foo = to_foo_obj(kobj); in foo_release()
107 kfree(foo); in foo_release()
116 return sysfs_emit(buf, "%d\n", foo_obj->foo); in foo_show()
124 ret = kstrtoint(buf, 10, &foo_obj->foo); in foo_store()
133 __ATTR(foo, 0664, foo_show, foo_store);
217 struct foo_obj *foo; in create_foo_obj() local
221 foo = kzalloc(sizeof(*foo), GFP_KERNEL); in create_foo_obj()
222 if (!foo) in create_foo_obj()
229 foo->kobj.kset = example_kset; in create_foo_obj()
237 retval = kobject_init_and_add(&foo->kobj, &foo_ktype, NULL, "%s", name); in create_foo_obj()
239 kobject_put(&foo->kobj); in create_foo_obj()
247 kobject_uevent(&foo->kobj, KOBJ_ADD); in create_foo_obj()
249 return foo; in create_foo_obj()
252 static void destroy_foo_obj(struct foo_obj *foo) in destroy_foo_obj() argument
254 kobject_put(&foo->kobj); in destroy_foo_obj()