Home
last modified time | relevance | path

Searched refs:battr (Results 1 – 3 of 3) sorted by relevance

/Linux-v4.19/fs/sysfs/
Dfile.c83 struct bin_attribute *battr = of->kn->priv; in sysfs_kf_bin_read() local
97 if (!battr->read) in sysfs_kf_bin_read()
100 return battr->read(of->file, kobj, battr, buf, pos, count); in sysfs_kf_bin_read()
146 struct bin_attribute *battr = of->kn->priv; in sysfs_kf_bin_write() local
158 if (!battr->write) in sysfs_kf_bin_write()
161 return battr->write(of->file, kobj, battr, buf, pos, count); in sysfs_kf_bin_write()
167 struct bin_attribute *battr = of->kn->priv; in sysfs_kf_bin_mmap() local
170 return battr->mmap(of->file, kobj, battr, vma); in sysfs_kf_bin_mmap()
285 struct bin_attribute *battr = (void *)attr; in sysfs_add_file_mode_ns() local
287 if (battr->mmap) in sysfs_add_file_mode_ns()
[all …]
/Linux-v4.19/drivers/misc/
Dsram.c44 part = container_of(attr, struct sram_partition, battr); in sram_read()
59 part = container_of(attr, struct sram_partition, battr); in sram_write()
91 sysfs_bin_attr_init(&part->battr); in sram_add_export()
92 part->battr.attr.name = devm_kasprintf(sram->dev, GFP_KERNEL, in sram_add_export()
95 if (!part->battr.attr.name) in sram_add_export()
98 part->battr.attr.mode = S_IRUSR | S_IWUSR; in sram_add_export()
99 part->battr.read = sram_read; in sram_add_export()
100 part->battr.write = sram_write; in sram_add_export()
101 part->battr.size = block->size; in sram_add_export()
103 return device_create_bin_file(sram->dev, &part->battr); in sram_add_export()
[all …]
Dsram.h15 struct bin_attribute battr; member