mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
sysfs: constify attribute_group::bin_attrs
All users of this field have been migrated to bin_attrs_new. It can now be constified. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20250313-sysfs-const-bin_attr-final-v2-2-96284e1e88ce@weissschuh.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
97d06802d1
commit
9bec944506
2 changed files with 4 additions and 4 deletions
|
@ -21,7 +21,7 @@ static void remove_files(struct kernfs_node *parent,
|
|||
const struct attribute_group *grp)
|
||||
{
|
||||
struct attribute *const *attr;
|
||||
struct bin_attribute *const *bin_attr;
|
||||
const struct bin_attribute *const *bin_attr;
|
||||
|
||||
if (grp->attrs)
|
||||
for (attr = grp->attrs; *attr; attr++)
|
||||
|
@ -47,7 +47,7 @@ static int create_files(struct kernfs_node *parent, struct kobject *kobj,
|
|||
const struct attribute_group *grp, int update)
|
||||
{
|
||||
struct attribute *const *attr;
|
||||
struct bin_attribute *const *bin_attr;
|
||||
const struct bin_attribute *const *bin_attr;
|
||||
int error = 0, i;
|
||||
|
||||
if (grp->attrs) {
|
||||
|
@ -521,7 +521,7 @@ static int sysfs_group_attrs_change_owner(struct kernfs_node *grp_kn,
|
|||
}
|
||||
|
||||
if (grp->bin_attrs) {
|
||||
struct bin_attribute *const *bin_attr;
|
||||
const struct bin_attribute *const *bin_attr;
|
||||
|
||||
for (bin_attr = grp->bin_attrs; *bin_attr; bin_attr++) {
|
||||
kn = kernfs_find_and_get(grp_kn, (*bin_attr)->attr.name);
|
||||
|
|
|
@ -107,7 +107,7 @@ struct attribute_group {
|
|||
int);
|
||||
struct attribute **attrs;
|
||||
union {
|
||||
struct bin_attribute **bin_attrs;
|
||||
const struct bin_attribute *const *bin_attrs;
|
||||
const struct bin_attribute *const *bin_attrs_new;
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue