Skip to content

Commit db68102

Browse files
ArvindYadavCsmchehab
authored andcommitted
media: rc: constify attribute_group structures
attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by <linux/sysfs.h> work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 11605 880 20 12505 30d9 drivers/media/rc/rc-main.o File size After adding 'const': text data bss dec hex filename 11797 720 20 12537 30f9 drivers/media/rc/rc-main.o Signed-off-by: Arvind Yadav <[email protected]> Signed-off-by: Sean Young <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent d9a77b9 commit db68102

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/media/rc/rc-main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1507,7 +1507,7 @@ static struct attribute *rc_dev_protocol_attrs[] = {
15071507
NULL,
15081508
};
15091509

1510-
static struct attribute_group rc_dev_protocol_attr_grp = {
1510+
static const struct attribute_group rc_dev_protocol_attr_grp = {
15111511
.attrs = rc_dev_protocol_attrs,
15121512
};
15131513

@@ -1517,7 +1517,7 @@ static struct attribute *rc_dev_filter_attrs[] = {
15171517
NULL,
15181518
};
15191519

1520-
static struct attribute_group rc_dev_filter_attr_grp = {
1520+
static const struct attribute_group rc_dev_filter_attr_grp = {
15211521
.attrs = rc_dev_filter_attrs,
15221522
};
15231523

@@ -1528,7 +1528,7 @@ static struct attribute *rc_dev_wakeup_filter_attrs[] = {
15281528
NULL,
15291529
};
15301530

1531-
static struct attribute_group rc_dev_wakeup_filter_attr_grp = {
1531+
static const struct attribute_group rc_dev_wakeup_filter_attr_grp = {
15321532
.attrs = rc_dev_wakeup_filter_attrs,
15331533
};
15341534

0 commit comments

Comments
 (0)