Lines Matching refs:attr
180 void sysfs_notify(struct kobject *kobj, const char *dir, const char *attr) in sysfs_notify() argument
189 if (kn && attr) { in sysfs_notify()
190 tmp = kernfs_find_and_get(kn, attr); in sysfs_notify()
255 const struct attribute *attr, umode_t mode, kuid_t uid, in sysfs_add_file_mode_ns() argument
290 if (!attr->ignore_lockdep) in sysfs_add_file_mode_ns()
291 key = attr->key ?: (struct lock_class_key *)&attr->skey; in sysfs_add_file_mode_ns()
294 kn = __kernfs_create_file(parent, attr->name, mode & 0777, uid, gid, in sysfs_add_file_mode_ns()
295 PAGE_SIZE, ops, (void *)attr, ns, key); in sysfs_add_file_mode_ns()
298 sysfs_warn_dup(parent, attr->name); in sysfs_add_file_mode_ns()
308 const struct attribute *attr = &battr->attr; in sysfs_add_bin_file_mode_ns() local
325 if (!attr->ignore_lockdep) in sysfs_add_bin_file_mode_ns()
326 key = attr->key ?: (struct lock_class_key *)&attr->skey; in sysfs_add_bin_file_mode_ns()
329 kn = __kernfs_create_file(parent, attr->name, mode & 0777, uid, gid, in sysfs_add_bin_file_mode_ns()
330 battr->size, ops, (void *)attr, ns, key); in sysfs_add_bin_file_mode_ns()
333 sysfs_warn_dup(parent, attr->name); in sysfs_add_bin_file_mode_ns()
345 int sysfs_create_file_ns(struct kobject *kobj, const struct attribute *attr, in sysfs_create_file_ns() argument
351 if (WARN_ON(!kobj || !kobj->sd || !attr)) in sysfs_create_file_ns()
355 return sysfs_add_file_mode_ns(kobj->sd, attr, attr->mode, uid, gid, ns); in sysfs_create_file_ns()
380 const struct attribute *attr, const char *group) in sysfs_add_file_to_group() argument
398 error = sysfs_add_file_mode_ns(parent, attr, attr->mode, uid, gid, in sysfs_add_file_to_group()
413 int sysfs_chmod_file(struct kobject *kobj, const struct attribute *attr, in sysfs_chmod_file() argument
420 kn = kernfs_find_and_get(kobj->sd, attr->name); in sysfs_chmod_file()
445 const struct attribute *attr) in sysfs_break_active_protection() argument
450 kn = kernfs_find_and_get(kobj->sd, attr->name); in sysfs_break_active_protection()
486 void sysfs_remove_file_ns(struct kobject *kobj, const struct attribute *attr, in sysfs_remove_file_ns() argument
491 kernfs_remove_by_name_ns(parent, attr->name, ns); in sysfs_remove_file_ns()
502 bool sysfs_remove_file_self(struct kobject *kobj, const struct attribute *attr) in sysfs_remove_file_self() argument
508 kn = kernfs_find_and_get(parent, attr->name); in sysfs_remove_file_self()
535 const struct attribute *attr, const char *group) in sysfs_remove_file_from_group() argument
547 kernfs_remove_by_name(parent, attr->name); in sysfs_remove_file_from_group()
559 const struct bin_attribute *attr) in sysfs_create_bin_file() argument
564 if (WARN_ON(!kobj || !kobj->sd || !attr)) in sysfs_create_bin_file()
568 return sysfs_add_bin_file_mode_ns(kobj->sd, attr, attr->attr.mode, uid, in sysfs_create_bin_file()
579 const struct bin_attribute *attr) in sysfs_remove_bin_file() argument
581 kernfs_remove_by_name(kobj->sd, attr->attr.name); in sysfs_remove_bin_file()