From: Arvind Yadav Date: Mon, 3 Jul 2017 10:10:04 +0000 (+0530) Subject: PM / devfreq: constify attribute_group structures. X-Git-Tag: accepted/tizen/4.0/unified/20170920.081531~55 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=890462344c2937830ba19c2e4d920765187c29a1;p=platform%2Fkernel%2Flinux-exynos.git PM / devfreq: constify attribute_group structures. attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 621 176 0 797 31d drivers/devfreq/governor_userspace.o File size After adding 'const': text data bss dec hex filename 670 144 0 814 32e drivers/devfreq/governor_userspace.o Signed-off-by: Arvind Yadav Reviewed-by: Chanwoo Choi Signed-off-by: MyungJoo Ham --- diff --git a/drivers/devfreq/governor_userspace.c b/drivers/devfreq/governor_userspace.c index 1769760..77028c2 100644 --- a/drivers/devfreq/governor_userspace.c +++ b/drivers/devfreq/governor_userspace.c @@ -86,7 +86,7 @@ static struct attribute *dev_entries[] = { &dev_attr_set_freq.attr, NULL, }; -static struct attribute_group dev_attr_group = { +static const struct attribute_group dev_attr_group = { .name = "userspace", .attrs = dev_entries, };