Skip to content

Commit 638ce0f

Browse files
musicakcdavem330
authored andcommitted
atm: solos-pci: constify attribute_group structures
Functions working with attribute_groups provided by <linux/sysfs.h> work with const attribute_group. These attribute_group structures do not change at runtime so mark them as const. File size before: text data bss dec hex filename 35740 28424 832 64996 fde4 drivers/atm/solos-pci.o File size after: text data bss dec hex filename 35932 28232 832 64996 fde4 drivers/atm/solos-pci.o This change was made with the help of Coccinelle. Signed-off-by: Amitoj Kaur Chawla <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 444826a commit 638ce0f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/atm/solos-pci.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ static struct attribute *solos_attrs[] = {
611611
NULL
612612
};
613613

614-
static struct attribute_group solos_attr_group = {
614+
static const struct attribute_group solos_attr_group = {
615615
.attrs = solos_attrs,
616616
.name = "parameters",
617617
};
@@ -628,7 +628,7 @@ static struct attribute *gpio_attrs[] = {
628628
NULL
629629
};
630630

631-
static struct attribute_group gpio_attr_group = {
631+
static const struct attribute_group gpio_attr_group = {
632632
.attrs = gpio_attrs,
633633
.name = "gpio",
634634
};

0 commit comments

Comments
 (0)