Lines Matching refs:kobj
19 static void remove_files(struct sysfs_dirent *dir_sd, struct kobject *kobj, in remove_files() argument
29 static int create_files(struct sysfs_dirent *dir_sd, struct kobject *kobj, in create_files() argument
44 mode = grp->is_visible(kobj, *attr, i); in create_files()
54 remove_files(dir_sd, kobj, grp); in create_files()
59 static int internal_create_group(struct kobject *kobj, int update, in internal_create_group() argument
65 BUG_ON(!kobj || (!update && !kobj->sd)); in internal_create_group()
68 if (unlikely(update && !kobj->sd)) in internal_create_group()
72 error = sysfs_create_subdir(kobj, grp->name, &sd); in internal_create_group()
76 sd = kobj->sd; in internal_create_group()
78 error = create_files(sd, kobj, grp, update); in internal_create_group()
97 int sysfs_create_group(struct kobject *kobj, in sysfs_create_group() argument
100 return internal_create_group(kobj, 0, grp); in sysfs_create_group()
120 int sysfs_update_group(struct kobject *kobj, in sysfs_update_group() argument
123 return internal_create_group(kobj, 1, grp); in sysfs_update_group()
128 void sysfs_remove_group(struct kobject * kobj, in sysfs_remove_group() argument
131 struct sysfs_dirent *dir_sd = kobj->sd; in sysfs_remove_group()
138 "kobject '%s'\n", grp, kobject_name(kobj)); in sysfs_remove_group()
144 remove_files(sd, kobj, grp); in sysfs_remove_group()