Lines Matching refs:gid_attr_group
56 struct gid_attr_group { struct
67 struct gid_attr_group *gid_attr_group; argument
200 struct ib_port *p = container_of(kobj, struct gid_attr_group, in gid_attr_show()
766 struct gid_attr_group *gid_attr_group = in ib_port_gid_attr_release() local
767 container_of(kobj, struct gid_attr_group, kobj); in ib_port_gid_attr_release()
770 for (i = 0; i != ARRAY_SIZE(gid_attr_group->groups); i++) in ib_port_gid_attr_release()
771 kfree(gid_attr_group->groups[i].attrs); in ib_port_gid_attr_release()
772 kfree(gid_attr_group); in ib_port_gid_attr_release()
1139 struct gid_attr_group *gid_attr_group; in setup_gid_attrs() local
1142 gid_attr_group = kzalloc(struct_size(gid_attr_group, attrs_list, in setup_gid_attrs()
1145 if (!gid_attr_group) in setup_gid_attrs()
1147 gid_attr_group->port = port; in setup_gid_attrs()
1148 kobject_init(&gid_attr_group->kobj, &gid_attr_type); in setup_gid_attrs()
1150 ret = alloc_port_table_group("ndevs", &gid_attr_group->groups[0], in setup_gid_attrs()
1151 gid_attr_group->attrs_list, in setup_gid_attrs()
1156 gid_attr_group->groups_list[0] = &gid_attr_group->groups[0]; in setup_gid_attrs()
1159 "types", &gid_attr_group->groups[1], in setup_gid_attrs()
1160 gid_attr_group->attrs_list + attr->gid_tbl_len, in setup_gid_attrs()
1164 gid_attr_group->groups_list[1] = &gid_attr_group->groups[1]; in setup_gid_attrs()
1166 ret = kobject_add(&gid_attr_group->kobj, &port->kobj, "gid_attrs"); in setup_gid_attrs()
1169 ret = sysfs_create_groups(&gid_attr_group->kobj, in setup_gid_attrs()
1170 gid_attr_group->groups_list); in setup_gid_attrs()
1173 port->gid_attr_group = gid_attr_group; in setup_gid_attrs()
1177 kobject_del(&gid_attr_group->kobj); in setup_gid_attrs()
1179 kobject_put(&gid_attr_group->kobj); in setup_gid_attrs()
1185 struct gid_attr_group *gid_attr_group = port->gid_attr_group; in destroy_gid_attrs() local
1187 if (!gid_attr_group) in destroy_gid_attrs()
1189 sysfs_remove_groups(&gid_attr_group->kobj, gid_attr_group->groups_list); in destroy_gid_attrs()
1190 kobject_del(&gid_attr_group->kobj); in destroy_gid_attrs()
1191 kobject_put(&gid_attr_group->kobj); in destroy_gid_attrs()