Lines Matching refs:kobj

30 	struct kobject *kobj = kn->parent->priv;  in sysfs_file_ops()  local
34 return kobj->ktype ? kobj->ktype->sysfs_ops : NULL; in sysfs_file_ops()
45 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_seq_show() local
63 count = ops->show(kobj, of->kn->priv, buf); in sysfs_kf_seq_show()
86 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_bin_read() local
102 return battr->read(of->file, kobj, battr, buf, pos, count); in sysfs_kf_bin_read()
110 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_read() local
119 len = ops->show(kobj, of->kn->priv, buf); in sysfs_kf_read()
128 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_write() local
133 return ops->store(kobj, of->kn->priv, buf, count); in sysfs_kf_write()
141 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_bin_write() local
155 return battr->write(of->file, kobj, battr, buf, pos, count); in sysfs_kf_bin_write()
162 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_bin_mmap() local
164 return battr->mmap(of->file, kobj, battr, vma); in sysfs_kf_bin_mmap()
167 void sysfs_notify(struct kobject *kobj, const char *dir, const char *attr) in sysfs_notify() argument
169 struct kernfs_node *kn = kobj->sd, *tmp; in sysfs_notify()
250 struct kobject *kobj = parent->priv; in sysfs_add_file_mode_ns() local
251 const struct sysfs_ops *sysfs_ops = kobj->ktype->sysfs_ops; in sysfs_add_file_mode_ns()
256 kobject_name(kobj))) in sysfs_add_file_mode_ns()
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()
331 int sysfs_create_files(struct kobject *kobj, const struct attribute **ptr) in sysfs_create_files() argument
337 err = sysfs_create_file(kobj, ptr[i]); in sysfs_create_files()
340 sysfs_remove_file(kobj, ptr[i]); in sysfs_create_files()
351 int sysfs_add_file_to_group(struct kobject *kobj, in sysfs_add_file_to_group() argument
358 parent = kernfs_find_and_get(kobj->sd, group); in sysfs_add_file_to_group()
360 parent = kobj->sd; 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
413 struct kernfs_node *parent = kobj->sd; in sysfs_remove_file_ns()
426 bool sysfs_remove_file_self(struct kobject *kobj, const struct attribute *attr) in sysfs_remove_file_self() argument
428 struct kernfs_node *parent = kobj->sd; in sysfs_remove_file_self()
442 void sysfs_remove_files(struct kobject *kobj, const struct attribute **ptr) in sysfs_remove_files() argument
446 sysfs_remove_file(kobj, ptr[i]); in sysfs_remove_files()
456 void sysfs_remove_file_from_group(struct kobject *kobj, in sysfs_remove_file_from_group() argument
462 parent = kernfs_find_and_get(kobj->sd, group); in sysfs_remove_file_from_group()
464 parent = kobj->sd; in sysfs_remove_file_from_group()
480 int sysfs_create_bin_file(struct kobject *kobj, 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()
494 void sysfs_remove_bin_file(struct kobject *kobj, in sysfs_remove_bin_file() argument
497 kernfs_remove_by_name(kobj->sd, attr->attr.name); in sysfs_remove_bin_file()