Lines Matching refs:notes_attrs
160 static void free_notes_attrs(struct module_notes_attrs *notes_attrs, in free_notes_attrs() argument
163 if (notes_attrs->dir) { in free_notes_attrs()
165 sysfs_remove_bin_file(notes_attrs->dir, in free_notes_attrs()
166 ¬es_attrs->attrs[i]); in free_notes_attrs()
167 kobject_put(notes_attrs->dir); in free_notes_attrs()
169 kfree(notes_attrs); in free_notes_attrs()
175 struct module_notes_attrs *notes_attrs; in add_notes_attrs() local
192 notes_attrs = kzalloc(struct_size(notes_attrs, attrs, notes), in add_notes_attrs()
194 if (!notes_attrs) in add_notes_attrs()
197 notes_attrs->notes = notes; in add_notes_attrs()
198 nattr = ¬es_attrs->attrs[0]; in add_notes_attrs()
214 notes_attrs->dir = kobject_create_and_add("notes", &mod->mkobj.kobj); in add_notes_attrs()
215 if (!notes_attrs->dir) in add_notes_attrs()
219 if (sysfs_create_bin_file(notes_attrs->dir, in add_notes_attrs()
220 ¬es_attrs->attrs[i])) in add_notes_attrs()
223 mod->notes_attrs = notes_attrs; in add_notes_attrs()
227 free_notes_attrs(notes_attrs, i); in add_notes_attrs()
232 if (mod->notes_attrs) in remove_notes_attrs()
233 free_notes_attrs(mod->notes_attrs, mod->notes_attrs->notes); in remove_notes_attrs()