Lines Matching refs:foo_obj
29 struct foo_obj { struct
35 #define to_foo_obj(x) container_of(x, struct foo_obj, kobj) argument
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()
77 struct foo_obj *foo; in foo_attr_store()
103 struct foo_obj *foo; in foo_release()
112 static ssize_t foo_show(struct foo_obj *foo_obj, struct foo_attribute *attr, in foo_show() argument
115 return sysfs_emit(buf, "%d\n", foo_obj->foo); in foo_show()
118 static ssize_t foo_store(struct foo_obj *foo_obj, struct foo_attribute *attr, in foo_store() argument
123 ret = kstrtoint(buf, 10, &foo_obj->foo); in foo_store()
138 static ssize_t b_show(struct foo_obj *foo_obj, struct foo_attribute *attr, in b_show() argument
144 var = foo_obj->baz; in b_show()
146 var = foo_obj->bar; in b_show()
150 static ssize_t b_store(struct foo_obj *foo_obj, struct foo_attribute *attr, in b_store() argument
160 foo_obj->baz = var; in b_store()
162 foo_obj->bar = var; in b_store()
195 static struct foo_obj *foo_obj; variable
196 static struct foo_obj *bar_obj;
197 static struct foo_obj *baz_obj;
199 static struct foo_obj *create_foo_obj(const char *name) in create_foo_obj()
201 struct foo_obj *foo; in create_foo_obj()
236 static void destroy_foo_obj(struct foo_obj *foo) in destroy_foo_obj()
254 foo_obj = create_foo_obj("foo"); in example_init()
255 if (!foo_obj) in example_init()
271 destroy_foo_obj(foo_obj); in example_init()
281 destroy_foo_obj(foo_obj); in example_exit()