From: Amitoj Kaur Chawla Date: Thu, 10 Aug 2017 16:28:09 +0000 (-0400) Subject: leds: lm3533: constify attribute_group structure X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=430e48ecf31f4f897047f22e02abdfa75730cad8;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git leds: lm3533: constify attribute_group structure Functions working with attribute_groups provided by 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 Acked-by: Pavel Machek Signed-off-by: Jacek Anaszewski --- diff --git a/drivers/leds/leds-lm3533.c b/drivers/leds/leds-lm3533.c index 5b529dc013d2..72224b599ffc 100644 --- a/drivers/leds/leds-lm3533.c +++ b/drivers/leds/leds-lm3533.c @@ -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 };