/kernel/linux/linux-6.6/fs/sysfs/ |
H A D | file.c | 80 struct bin_attribute *battr = of->kn->priv; in sysfs_kf_bin_read() local 94 if (!battr->read) in sysfs_kf_bin_read() 97 return battr->read(of->file, kobj, battr, buf, pos, count); in sysfs_kf_bin_read() 143 struct bin_attribute *battr = of->kn->priv; in sysfs_kf_bin_write() local 155 if (!battr->write) in sysfs_kf_bin_write() 158 return battr->write(of->file, kobj, battr, buf, pos, count); in sysfs_kf_bin_write() 164 struct bin_attribute *battr = of->kn->priv; in sysfs_kf_bin_mmap() local 167 return battr in sysfs_kf_bin_mmap() 172 struct bin_attribute *battr = of->kn->priv; sysfs_kf_bin_open() local 304 sysfs_add_bin_file_mode_ns(struct kernfs_node *parent, const struct bin_attribute *battr, umode_t mode, kuid_t uid, kgid_t gid, const void *ns) sysfs_add_bin_file_mode_ns() argument [all...] |
H A D | sysfs.h | 34 const struct bin_attribute *battr, umode_t mode,
|
/kernel/linux/linux-5.10/fs/sysfs/ |
H A D | file.c | 83 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 in sysfs_kf_bin_mmap() 285 struct bin_attribute *battr = (void *)attr; sysfs_add_file_mode_ns() local [all...] |
/kernel/linux/linux-6.6/kernel/module/ |
H A D | sysfs.c | 23 struct bin_attribute battr; member 35 struct bin_attribute *battr, in module_sect_read() 39 container_of(battr, struct module_sect_attr, battr); in module_sect_read() 68 kfree(sect_attrs->attrs[section].battr.attr.name); in free_sect_attrs() 102 sysfs_bin_attr_init(&sattr->battr); in add_sect_attrs() 104 sattr->battr.attr.name = in add_sect_attrs() 106 if (!sattr->battr.attr.name) in add_sect_attrs() 109 sattr->battr.read = module_sect_read; in add_sect_attrs() 110 sattr->battr in add_sect_attrs() 34 module_sect_read(struct file *file, struct kobject *kobj, struct bin_attribute *battr, char *buf, loff_t pos, size_t count) module_sect_read() argument [all...] |
/kernel/linux/linux-5.10/drivers/misc/ |
H A D | sram.c | 31 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...] |
H A D | sram.h | 12 struct bin_attribute battr; member
|
/kernel/linux/linux-6.6/drivers/misc/ |
H A D | sram.c | 31 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...] |
H A D | sram.h | 17 struct bin_attribute battr; member
|
/kernel/linux/linux-5.10/kernel/ |
H A D | module.c | 1547 struct bin_attribute battr; member 1559 struct bin_attribute *battr, in module_sect_read() 1563 container_of(battr, struct module_sect_attr, battr); in module_sect_read() 1592 kfree(sect_attrs->attrs[section].battr.attr.name); in free_sect_attrs() 1625 sysfs_bin_attr_init(&sattr->battr); in add_sect_attrs() 1627 sattr->battr.attr.name = in add_sect_attrs() 1629 if (sattr->battr.attr.name == NULL) in add_sect_attrs() 1632 sattr->battr.read = module_sect_read; in add_sect_attrs() 1633 sattr->battr in add_sect_attrs() 1558 module_sect_read(struct file *file, struct kobject *kobj, struct bin_attribute *battr, char *buf, loff_t pos, size_t count) module_sect_read() argument [all...] |
/kernel/linux/linux-6.6/drivers/hwmon/occ/ |
H A D | p9_sbe.c | 33 struct bin_attribute *battr, char *buf, loff_t pos, in ffdc_read() 32 ffdc_read(struct file *filp, struct kobject *kobj, struct bin_attribute *battr, char *buf, loff_t pos, size_t count) ffdc_read() argument
|