Lines Matching refs:foo_obj
31 struct foo_obj { struct
37 #define to_foo_obj(x) container_of(x, struct foo_obj, kobj) argument
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()
79 struct foo_obj *foo; in foo_attr_store()
105 struct foo_obj *foo; in foo_release()
114 static ssize_t foo_show(struct foo_obj *foo_obj, struct foo_attribute *attr, in foo_show() argument
117 return sprintf(buf, "%d\n", foo_obj->foo); in foo_show()
120 static ssize_t foo_store(struct foo_obj *foo_obj, struct foo_attribute *attr, in foo_store() argument
125 ret = kstrtoint(buf, 10, &foo_obj->foo); in foo_store()
140 static ssize_t b_show(struct foo_obj *foo_obj, struct foo_attribute *attr, in b_show() argument
146 var = foo_obj->baz; in b_show()
148 var = foo_obj->bar; in b_show()
152 static ssize_t b_store(struct foo_obj *foo_obj, struct foo_attribute *attr, in b_store() argument
162 foo_obj->baz = var; in b_store()
164 foo_obj->bar = var; in b_store()
196 static struct foo_obj *foo_obj; variable
197 static struct foo_obj *bar_obj;
198 static struct foo_obj *baz_obj;
200 static struct foo_obj *create_foo_obj(const char *name) in create_foo_obj()
202 struct foo_obj *foo; in create_foo_obj()
237 static void destroy_foo_obj(struct foo_obj *foo) in destroy_foo_obj()
255 foo_obj = create_foo_obj("foo"); in example_init()
256 if (!foo_obj) in example_init()
272 destroy_foo_obj(foo_obj); in example_init()
282 destroy_foo_obj(foo_obj); in example_exit()