Lines Matching refs:attr

167 void sysfs_notify(struct kobject *kobj, const char *dir, const char *attr)  in sysfs_notify()  argument
176 if (kn && attr) { in sysfs_notify()
177 tmp = kernfs_find_and_get(kn, attr); in sysfs_notify()
241 const struct attribute *attr, bool is_bin, in sysfs_add_file_mode_ns() argument
279 struct bin_attribute *battr = (void *)attr; in sysfs_add_file_mode_ns()
296 if (!attr->ignore_lockdep) in sysfs_add_file_mode_ns()
297 key = attr->key ?: (struct lock_class_key *)&attr->skey; in sysfs_add_file_mode_ns()
299 kn = __kernfs_create_file(parent, attr->name, mode & 0777, size, ops, in sysfs_add_file_mode_ns()
300 (void *)attr, ns, key); in sysfs_add_file_mode_ns()
303 sysfs_warn_dup(parent, attr->name); in sysfs_add_file_mode_ns()
309 int sysfs_add_file(struct kernfs_node *parent, const struct attribute *attr, in sysfs_add_file() argument
312 return sysfs_add_file_mode_ns(parent, attr, is_bin, attr->mode, NULL); in sysfs_add_file()
321 int sysfs_create_file_ns(struct kobject *kobj, const struct attribute *attr, in sysfs_create_file_ns() argument
324 BUG_ON(!kobj || !kobj->sd || !attr); in sysfs_create_file_ns()
326 return sysfs_add_file_mode_ns(kobj->sd, attr, false, attr->mode, ns); in sysfs_create_file_ns()
352 const struct attribute *attr, const char *group) in sysfs_add_file_to_group() argument
367 error = sysfs_add_file(parent, attr, false); in sysfs_add_file_to_group()
381 int sysfs_chmod_file(struct kobject *kobj, const struct attribute *attr, in sysfs_chmod_file() argument
388 kn = kernfs_find_and_get(kobj->sd, attr->name); in sysfs_chmod_file()
410 void sysfs_remove_file_ns(struct kobject *kobj, const struct attribute *attr, in sysfs_remove_file_ns() argument
415 kernfs_remove_by_name_ns(parent, attr->name, ns); in sysfs_remove_file_ns()
426 bool sysfs_remove_file_self(struct kobject *kobj, const struct attribute *attr) in sysfs_remove_file_self() argument
432 kn = kernfs_find_and_get(parent, attr->name); in sysfs_remove_file_self()
457 const struct attribute *attr, const char *group) in sysfs_remove_file_from_group() argument
469 kernfs_remove_by_name(parent, attr->name); in sysfs_remove_file_from_group()
481 const struct bin_attribute *attr) in sysfs_create_bin_file() argument
483 BUG_ON(!kobj || !kobj->sd || !attr); in sysfs_create_bin_file()
485 return sysfs_add_file(kobj->sd, &attr->attr, true); in sysfs_create_bin_file()
495 const struct bin_attribute *attr) in sysfs_remove_bin_file() argument
497 kernfs_remove_by_name(kobj->sd, attr->attr.name); in sysfs_remove_bin_file()