Lines Matching full:sg
27 struct attribute_group sg; member
129 static int __init add_attr_group(const __be32 *ops, int len, struct sensor_group *sg, in add_attr_group() argument
138 add_attr(handle, &sg->sgattrs[count], j); in add_attr_group()
139 sg->sg.attrs[count] = in add_attr_group()
140 &sg->sgattrs[count].attr.attr; in add_attr_group()
144 return sysfs_create_group(sg_kobj, &sg->sg); in add_attr_group()
162 struct device_node *sg, *node; in opal_sensor_groups_init() local
165 sg = of_find_compatible_node(NULL, NULL, "ibm,opal-sensor-group"); in opal_sensor_groups_init()
166 if (!sg) { in opal_sensor_groups_init()
171 sgs = kcalloc(of_get_child_count(sg), sizeof(*sgs), GFP_KERNEL); in opal_sensor_groups_init()
181 for_each_child_of_node(sg, node) { in opal_sensor_groups_init()
198 sgs[i].sg.attrs = kcalloc(nr_attrs + 1, in opal_sensor_groups_init()
199 sizeof(*sgs[i].sg.attrs), in opal_sensor_groups_init()
202 if (!sgs[i].sg.attrs) { in opal_sensor_groups_init()
217 sgs[i].sg.name = sgs[i].name; in opal_sensor_groups_init()
220 sgs[i].sg.name); in opal_sensor_groups_init()
225 of_node_put(sg); in opal_sensor_groups_init()
232 kfree(sgs[i].sg.attrs); in opal_sensor_groups_init()
239 of_node_put(sg); in opal_sensor_groups_init()