提交 430e48ec 编写于 作者: A Amitoj Kaur Chawla 提交者: Jacek Anaszewski

leds: lm3533: constify attribute_group structure

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: NAmitoj Kaur Chawla <amitoj1606@gmail.com>
Acked-by: NPavel Machek <pavel@ucw.cz>
Signed-off-by: NJacek Anaszewski <jacek.anaszewski@gmail.com>
上级 15201b5d
...@@ -626,7 +626,7 @@ static umode_t lm3533_led_attr_is_visible(struct kobject *kobj, ...@@ -626,7 +626,7 @@ static umode_t lm3533_led_attr_is_visible(struct kobject *kobj,
return mode; 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, .is_visible = lm3533_led_attr_is_visible,
.attrs = lm3533_led_attributes .attrs = lm3533_led_attributes
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册