Lines Matching refs:device_attribute
86 For example, the driver model defines struct device_attribute like:
88 struct device_attribute {
90 ssize_t (*show)(struct device *dev, struct device_attribute *attr,
92 ssize_t (*store)(struct device *dev, struct device_attribute *attr,
96 int device_create_file(struct device *, const struct device_attribute *);
97 void device_remove_file(struct device *, const struct device_attribute *);
102 struct device_attribute dev_attr_##_name = __ATTR(_name, _mode, _show, _store)
110 static struct device_attribute dev_attr_foo = {
145 #define to_dev_attr(_attr) container_of(_attr, struct device_attribute, attr)
150 struct device_attribute *dev_attr = to_dev_attr(attr);
172 ssize_t (*show)(struct device *dev, struct device_attribute *attr, char *buf);
173 ssize_t (*store)(struct device *dev, struct device_attribute *attr,
235 static ssize_t show_name(struct device *dev, struct device_attribute *attr,
241 static ssize_t store_name(struct device *dev, struct device_attribute *attr,
317 struct device_attribute {
319 ssize_t (*show)(struct device *dev, struct device_attribute *attr,
321 ssize_t (*store)(struct device *dev, struct device_attribute *attr,
331 int device_create_file(struct device *dev, const struct device_attribute * attr);
332 void device_remove_file(struct device *dev, const struct device_attribute * attr);