Lines Matching refs:attr

22 static ssize_t soc_info_show(struct device *dev, struct device_attribute *attr,
27 struct soc_device_attribute *attr;
48 struct attribute *attr,
54 if ((attr == &dev_attr_machine.attr) && soc_dev->attr->machine)
55 return attr->mode;
56 if ((attr == &dev_attr_family.attr) && soc_dev->attr->family)
57 return attr->mode;
58 if ((attr == &dev_attr_revision.attr) && soc_dev->attr->revision)
59 return attr->mode;
60 if ((attr == &dev_attr_serial_number.attr) && soc_dev->attr->serial_number)
61 return attr->mode;
62 if ((attr == &dev_attr_soc_id.attr) && soc_dev->attr->soc_id)
63 return attr->mode;
69 static ssize_t soc_info_show(struct device *dev, struct device_attribute *attr,
75 if (attr == &dev_attr_machine)
76 output = soc_dev->attr->machine;
77 else if (attr == &dev_attr_family)
78 output = soc_dev->attr->family;
79 else if (attr == &dev_attr_revision)
80 output = soc_dev->attr->revision;
81 else if (attr == &dev_attr_serial_number)
82 output = soc_dev->attr->serial_number;
83 else if (attr == &dev_attr_soc_id)
84 output = soc_dev->attr->soc_id;
92 &dev_attr_machine.attr,
93 &dev_attr_family.attr,
94 &dev_attr_serial_number.attr,
95 &dev_attr_soc_id.attr,
96 &dev_attr_revision.attr,
163 soc_dev->attr = soc_dev_attr;
187 /* Ensure soc_dev->attr is freed after calling soc_device_unregister. */
211 static int soc_device_match_attr(const struct soc_device_attribute *attr,
215 (!attr->machine || !glob_match(match->machine, attr->machine)))
219 (!attr->family || !glob_match(match->family, attr->family)))
223 (!attr->revision || !glob_match(match->revision, attr->revision)))
227 (!attr->soc_id || !glob_match(match->soc_id, attr->soc_id)))
237 return soc_device_match_attr(soc_dev->attr, arg);