Commit 37d644aa authored by Arvind Yadav's avatar Arvind Yadav Committed by MyungJoo Ham

PM / devfreq: constify attribute_group structures.

attribute_groups are not supposed to change at runtime. All functions
working with attribute_groups provided by <linux/sysfs.h> 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: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
Reviewed-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: default avatarMyungJoo Ham <myungjoo.ham@samsung.com>
parent 9e578b37
...@@ -86,7 +86,7 @@ static struct attribute *dev_entries[] = { ...@@ -86,7 +86,7 @@ static struct attribute *dev_entries[] = {
&dev_attr_set_freq.attr, &dev_attr_set_freq.attr,
NULL, NULL,
}; };
static struct attribute_group dev_attr_group = { static const struct attribute_group dev_attr_group = {
.name = "userspace", .name = "userspace",
.attrs = dev_entries, .attrs = dev_entries,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment