Skip to content

Commit a890d56

Browse files
ArvindYadavCsgregkh
authored andcommitted
w1: constify attribute_group structures.
attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by <linux/sysfs.h> work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 47a6623 commit a890d56

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/w1/w1.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ static struct attribute *w1_master_default_attrs[] = {
568568
NULL
569569
};
570570

571-
static struct attribute_group w1_master_defattr_group = {
571+
static const struct attribute_group w1_master_defattr_group = {
572572
.attrs = w1_master_default_attrs,
573573
};
574574

0 commit comments

Comments
 (0)