Lines Matching refs:attr
21 static ssize_t soc_info_show(struct device *dev, struct device_attribute *attr,
26 struct soc_device_attribute *attr;
46 struct attribute *attr,
52 if ((attr == &dev_attr_machine.attr) && soc_dev->attr->machine)
53 return attr->mode;
54 if ((attr == &dev_attr_family.attr) && soc_dev->attr->family)
55 return attr->mode;
56 if ((attr == &dev_attr_revision.attr) && soc_dev->attr->revision)
57 return attr->mode;
58 if ((attr == &dev_attr_serial_number.attr) && soc_dev->attr->serial_number)
59 return attr->mode;
60 if ((attr == &dev_attr_soc_id.attr) && soc_dev->attr->soc_id)
61 return attr->mode;
67 static ssize_t soc_info_show(struct device *dev, struct device_attribute *attr,
73 if (attr == &dev_attr_machine)
74 output = soc_dev->attr->machine;
75 else if (attr == &dev_attr_family)
76 output = soc_dev->attr->family;
77 else if (attr == &dev_attr_revision)
78 output = soc_dev->attr->revision;
79 else if (attr == &dev_attr_serial_number)
80 output = soc_dev->attr->serial_number;
81 else if (attr == &dev_attr_soc_id)
82 output = soc_dev->attr->soc_id;
90 &dev_attr_machine.attr,
91 &dev_attr_family.attr,
92 &dev_attr_serial_number.attr,
93 &dev_attr_soc_id.attr,
94 &dev_attr_revision.attr,
147 soc_dev->attr = soc_dev_attr;
171 /* Ensure soc_dev->attr is freed prior to calling soc_device_unregister. */
194 static int soc_device_match_attr(const struct soc_device_attribute *attr,
198 (!attr->machine || !glob_match(match->machine, attr->machine)))
202 (!attr->family || !glob_match(match->family, attr->family)))
206 (!attr->revision || !glob_match(match->revision, attr->revision)))
210 (!attr->soc_id || !glob_match(match->soc_id, attr->soc_id)))
220 return soc_device_match_attr(soc_dev->attr, arg);