Lines Matching full:struct
74 struct attribute {
76 struct module *owner;
81 int sysfs_create_file(struct kobject * kobj, const struct attribute * attr);
82 void sysfs_remove_file(struct kobject * kobj, const struct attribute * attr);
90 For example, the driver model defines struct device_attribute like::
92 struct device_attribute {
93 struct attribute attr;
94 ssize_t (*show)(struct device *dev, struct device_attribute *attr,
96 ssize_t (*store)(struct device *dev, struct device_attribute *attr,
100 int device_create_file(struct device *, const struct device_attribute *);
101 void device_remove_file(struct device *, const struct device_attribute *);
106 struct device_attribute dev_attr_##_name = __ATTR(_name, _mode, _show, _store)
114 static struct device_attribute dev_attr_foo = {
131 static struct device_attribute dev_attr_foo = __ATTR_RW(foo);
158 struct sysfs_ops {
159 ssize_t (*show)(struct kobject *, struct attribute *, char *);
160 ssize_t (*store)(struct kobject *, struct attribute *, const char *, size_t);
163 [ Subsystems should have already defined a struct kobj_type as a
168 for the type. The method then translates the generic struct kobject
169 and struct attribute pointers to the appropriate pointer types, and
175 #define to_dev_attr(_attr) container_of(_attr, struct device_attribute, attr)
177 static ssize_t dev_attr_show(struct kobject *kobj, struct attribute *attr,
180 struct device_attribute *dev_attr = to_dev_attr(attr);
181 struct device *dev = kobj_to_dev(kobj);
202 ssize_t (*show)(struct device *dev, struct device_attribute *attr, char *buf);
203 ssize_t (*store)(struct device *dev, struct device_attribute *attr,
263 static ssize_t show_name(struct device *dev, struct device_attribute *attr,
269 static ssize_t store_name(struct device *dev, struct device_attribute *attr,
307 struct device.
352 struct device_attribute {
353 struct attribute attr;
354 ssize_t (*show)(struct device *dev, struct device_attribute *attr,
356 ssize_t (*store)(struct device *dev, struct device_attribute *attr,
366 int device_create_file(struct device *dev, const struct device_attribute * attr);
367 void device_remove_file(struct device *dev, const struct device_attribute * attr);
374 struct bus_attribute {
375 struct attribute attr;
376 ssize_t (*show)(const struct bus_type *, char * buf);
377 ssize_t (*store)(const struct bus_type *, const char * buf, size_t count);
388 int bus_create_file(struct bus_type *, struct bus_attribute *);
389 void bus_remove_file(struct bus_type *, struct bus_attribute *);
397 struct driver_attribute {
398 struct attribute attr;
399 ssize_t (*show)(struct device_driver *, char * buf);
400 ssize_t (*store)(struct device_driver *, const char * buf,
411 int driver_create_file(struct device_driver *, const struct driver_attribute *);
412 void driver_remove_file(struct device_driver *, const struct driver_attribute *);