Lines Matching refs:of
44 struct kernfs_open_file *of = sf->private; in sysfs_kf_seq_show() local
45 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_seq_show()
46 const struct sysfs_ops *ops = sysfs_file_ops(of->kn); in sysfs_kf_seq_show()
63 count = ops->show(kobj, of->kn->priv, buf); in sysfs_kf_seq_show()
82 static ssize_t sysfs_kf_bin_read(struct kernfs_open_file *of, char *buf, in sysfs_kf_bin_read() argument
85 struct bin_attribute *battr = of->kn->priv; in sysfs_kf_bin_read()
86 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_bin_read()
87 loff_t size = file_inode(of->file)->i_size; in sysfs_kf_bin_read()
102 return battr->read(of->file, kobj, battr, buf, pos, count); in sysfs_kf_bin_read()
106 static ssize_t sysfs_kf_read(struct kernfs_open_file *of, char *buf, in sysfs_kf_read() argument
109 const struct sysfs_ops *ops = sysfs_file_ops(of->kn); in sysfs_kf_read()
110 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_read()
117 if (pos || WARN_ON_ONCE(buf != of->prealloc_buf)) in sysfs_kf_read()
119 len = ops->show(kobj, of->kn->priv, buf); in sysfs_kf_read()
124 static ssize_t sysfs_kf_write(struct kernfs_open_file *of, char *buf, in sysfs_kf_write() argument
127 const struct sysfs_ops *ops = sysfs_file_ops(of->kn); in sysfs_kf_write()
128 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_write()
133 return ops->store(kobj, of->kn->priv, buf, count); in sysfs_kf_write()
137 static ssize_t sysfs_kf_bin_write(struct kernfs_open_file *of, char *buf, in sysfs_kf_bin_write() argument
140 struct bin_attribute *battr = of->kn->priv; in sysfs_kf_bin_write()
141 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_bin_write()
142 loff_t size = file_inode(of->file)->i_size; in sysfs_kf_bin_write()
155 return battr->write(of->file, kobj, battr, buf, pos, count); in sysfs_kf_bin_write()
158 static int sysfs_kf_bin_mmap(struct kernfs_open_file *of, in sysfs_kf_bin_mmap() argument
161 struct bin_attribute *battr = of->kn->priv; in sysfs_kf_bin_mmap()
162 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_bin_mmap()
164 return battr->mmap(of->file, kobj, battr, vma); in sysfs_kf_bin_mmap()