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()
116 if (pos || WARN_ON_ONCE(buf != of->prealloc_buf)) in sysfs_kf_read()
118 return ops->show(kobj, of->kn->priv, buf); in sysfs_kf_read()
122 static ssize_t sysfs_kf_write(struct kernfs_open_file *of, char *buf, in sysfs_kf_write() argument
125 const struct sysfs_ops *ops = sysfs_file_ops(of->kn); in sysfs_kf_write()
126 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_write()
131 return ops->store(kobj, of->kn->priv, buf, count); in sysfs_kf_write()
135 static ssize_t sysfs_kf_bin_write(struct kernfs_open_file *of, char *buf, in sysfs_kf_bin_write() argument
138 struct bin_attribute *battr = of->kn->priv; in sysfs_kf_bin_write()
139 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_bin_write()
140 loff_t size = file_inode(of->file)->i_size; in sysfs_kf_bin_write()
153 return battr->write(of->file, kobj, battr, buf, pos, count); in sysfs_kf_bin_write()
156 static int sysfs_kf_bin_mmap(struct kernfs_open_file *of, in sysfs_kf_bin_mmap() argument
159 struct bin_attribute *battr = of->kn->priv; in sysfs_kf_bin_mmap()
160 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_bin_mmap()
162 return battr->mmap(of->file, kobj, battr, vma); in sysfs_kf_bin_mmap()