Lines Matching refs:struct

90 struct attribute {
92 struct module *owner;
97 int sysfs_create_file(struct kobject * kobj, const struct attribute * attr);
98 void sysfs_remove_file(struct kobject * kobj, const struct attribute * attr);
106 struct device_attribute {
107 struct attribute attr;
108 ssize_t (*show)(struct device *dev, struct device_attribute *attr,
110 ssize_t (*store)(struct device *dev, struct device_attribute *attr,
114 int device_create_file(struct device *, const struct device_attribute *);
115 void device_remove_file(struct device *, const struct device_attribute *);
120 struct device_attribute dev_attr_##_name = __ATTR(_name, _mode, _show, _store)
128 static struct device_attribute dev_attr_foo = {
144 struct sysfs_ops {
145 ssize_t (*show)(struct kobject *, struct attribute *, char *);
146 ssize_t (*store)(struct kobject *, struct attribute *, const char *, size_t);
149 [子系統應已經定義了一個 struct kobj_type 結構體作爲這個類型的
160 #define to_dev_attr(_attr) container_of(_attr, struct device_attribute, attr)
162 static ssize_t dev_attr_show(struct kobject *kobj, struct attribute *attr,
165 struct device_attribute *dev_attr = to_dev_attr(attr);
166 struct device *dev = kobj_to_dev(kobj);
186 ssize_t (*show)(struct device *dev, struct device_attribute *attr, char *buf);
187 ssize_t (*store)(struct device *dev, struct device_attribute *attr,
237 static ssize_t show_name(struct device *dev, struct device_attribute *attr,
243 static ssize_t store_name(struct device *dev, struct device_attribute *attr,
311 struct device_attribute {
312 struct attribute attr;
313 ssize_t (*show)(struct device *dev, struct device_attribute *attr,
315 ssize_t (*store)(struct device *dev, struct device_attribute *attr,
325 int device_create_file(struct device *dev, const struct device_attribute * attr);
326 void device_remove_file(struct device *dev, const struct device_attribute * attr);
333 struct bus_attribute {
334 struct attribute attr;
335 ssize_t (*show)(const struct bus_type *, char * buf);
336 ssize_t (*store)(const struct bus_type *, const char * buf, size_t count);
345 int bus_create_file(struct bus_type *, struct bus_attribute *);
346 void bus_remove_file(struct bus_type *, struct bus_attribute *);
354 struct driver_attribute {
355 struct attribute attr;
356 ssize_t (*show)(struct device_driver *, char * buf);
357 ssize_t (*store)(struct device_driver *, const char * buf,
367 int driver_create_file(struct device_driver *, const struct driver_attribute *);
368 void driver_remove_file(struct device_driver *, const struct driver_attribute *);