Home
last modified time | relevance | path

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

/Linux-v5.4/fs/sysfs/
Dfile.c82 struct bin_attribute *battr = of->kn->priv; in sysfs_kf_bin_read() local
96 if (!battr->read) in sysfs_kf_bin_read()
99 return battr->read(of->file, kobj, battr, buf, pos, count); in sysfs_kf_bin_read()
145 struct bin_attribute *battr = of->kn->priv; in sysfs_kf_bin_write() local
157 if (!battr->write) in sysfs_kf_bin_write()
160 return battr->write(of->file, kobj, battr, buf, pos, count); in sysfs_kf_bin_write()
166 struct bin_attribute *battr = of->kn->priv; in sysfs_kf_bin_mmap() local
169 return battr->mmap(of->file, kobj, battr, vma); in sysfs_kf_bin_mmap()
284 struct bin_attribute *battr = (void *)attr; in sysfs_add_file_mode_ns() local
286 if (battr->mmap) in sysfs_add_file_mode_ns()
[all …]
/Linux-v5.4/drivers/misc/
Dsram.c31 part = container_of(attr, struct sram_partition, battr); in sram_read()
46 part = container_of(attr, struct sram_partition, battr); in sram_write()
78 sysfs_bin_attr_init(&part->battr); in sram_add_export()
79 part->battr.attr.name = devm_kasprintf(sram->dev, GFP_KERNEL, in sram_add_export()
82 if (!part->battr.attr.name) in sram_add_export()
85 part->battr.attr.mode = S_IRUSR | S_IWUSR; in sram_add_export()
86 part->battr.read = sram_read; in sram_add_export()
87 part->battr.write = sram_write; in sram_add_export()
88 part->battr.size = block->size; in sram_add_export()
90 return device_create_bin_file(sram->dev, &part->battr); in sram_add_export()
[all …]
Dsram.h12 struct bin_attribute battr; member