mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
sysfs: treewide: switch back to bin_attribute::read()/write()
The bin_attribute argument of bin_attribute::read() is now const. This makes the _new() callbacks unnecessary. Switch all users back. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20250530-sysfs-const-bin_attr-final-v3-3-724bfcf05b99@weissschuh.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
340d8e66c4
commit
2fbe82037a
@@ -101,7 +101,7 @@ static int add_sect_attrs(struct module *mod, const struct load_info *info)
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
sattr->read_new = module_sect_read;
|
||||
sattr->read = module_sect_read;
|
||||
sattr->private = (void *)sec->sh_addr;
|
||||
sattr->size = MODULE_SECT_READ_SIZE;
|
||||
sattr->attr.mode = 0400;
|
||||
@@ -190,7 +190,7 @@ static int add_notes_attrs(struct module *mod, const struct load_info *info)
|
||||
nattr->attr.mode = 0444;
|
||||
nattr->size = info->sechdrs[i].sh_size;
|
||||
nattr->private = (void *)info->sechdrs[i].sh_addr;
|
||||
nattr->read_new = sysfs_bin_attr_simple_read;
|
||||
nattr->read = sysfs_bin_attr_simple_read;
|
||||
*(gattr++) = nattr++;
|
||||
}
|
||||
++loaded;
|
||||
|
||||
Reference in New Issue
Block a user