Skip to content

Commit

Permalink
leds: lm3533: constify attribute_group structure
Browse files Browse the repository at this point in the history
Functions working with attribute_groups provided by <linux/device.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
 8272      4608      64   12944    3290 drivers/leds/leds-lm3533.o

File size after:
 text      data     bss     dec     hex filename
 8368      4512      64   12944    3290 drivers/leds/leds-lm3533.o

This change was made with the help of Coccinelle.

Signed-off-by: Amitoj Kaur Chawla <[email protected]>
Acked-by: Pavel Machek <[email protected]>
Signed-off-by: Jacek Anaszewski <[email protected]>
  • Loading branch information
musicakc authored and jacek-anaszewski committed Aug 29, 2017
1 parent 15201b5 commit 430e48e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/leds/leds-lm3533.c
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ static umode_t lm3533_led_attr_is_visible(struct kobject *kobj,
return mode;
};

static struct attribute_group lm3533_led_attribute_group = {
static const struct attribute_group lm3533_led_attribute_group = {
.is_visible = lm3533_led_attr_is_visible,
.attrs = lm3533_led_attributes
};
Expand Down

0 comments on commit 430e48e

Please sign in to comment.