Skip to content

Commit

Permalink
PM / devfreq: constify attribute_group structures.
Browse files Browse the repository at this point in the history
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: Arvind Yadav <arvind.yadav.cs@gmail.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
  • Loading branch information
ArvindYadavCs authored and myungjoo committed Jul 6, 2017
1 parent 9e578b3 commit 37d644a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/devfreq/governor_userspace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down

0 comments on commit 37d644a

Please sign in to comment.