Lines Matching refs:of

43 	struct kernfs_open_file *of = sf->private;  in sysfs_kf_seq_show()  local
44 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_seq_show()
45 const struct sysfs_ops *ops = sysfs_file_ops(of->kn); in sysfs_kf_seq_show()
62 count = ops->show(kobj, of->kn->priv, buf); in sysfs_kf_seq_show()
81 static ssize_t sysfs_kf_bin_read(struct kernfs_open_file *of, char *buf, in sysfs_kf_bin_read() argument
84 struct bin_attribute *battr = of->kn->priv; in sysfs_kf_bin_read()
85 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_bin_read()
86 loff_t size = file_inode(of->file)->i_size; in sysfs_kf_bin_read()
101 return battr->read(of->file, kobj, battr, buf, pos, count); in sysfs_kf_bin_read()
105 static ssize_t sysfs_kf_read(struct kernfs_open_file *of, char *buf, in sysfs_kf_read() argument
108 const struct sysfs_ops *ops = sysfs_file_ops(of->kn); in sysfs_kf_read()
109 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_read()
116 if (WARN_ON_ONCE(buf != of->prealloc_buf)) in sysfs_kf_read()
118 len = ops->show(kobj, of->kn->priv, buf); in sysfs_kf_read()
131 static ssize_t sysfs_kf_write(struct kernfs_open_file *of, char *buf, in sysfs_kf_write() argument
134 const struct sysfs_ops *ops = sysfs_file_ops(of->kn); in sysfs_kf_write()
135 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_write()
140 return ops->store(kobj, of->kn->priv, buf, count); in sysfs_kf_write()
144 static ssize_t sysfs_kf_bin_write(struct kernfs_open_file *of, char *buf, in sysfs_kf_bin_write() argument
147 struct bin_attribute *battr = of->kn->priv; in sysfs_kf_bin_write()
148 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_bin_write()
149 loff_t size = file_inode(of->file)->i_size; in sysfs_kf_bin_write()
162 return battr->write(of->file, kobj, battr, buf, pos, count); in sysfs_kf_bin_write()
165 static int sysfs_kf_bin_mmap(struct kernfs_open_file *of, in sysfs_kf_bin_mmap() argument
168 struct bin_attribute *battr = of->kn->priv; in sysfs_kf_bin_mmap()
169 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_bin_mmap()
171 return battr->mmap(of->file, kobj, battr, vma); in sysfs_kf_bin_mmap()