Commit 4b7942d8 authored by Arvind Yadav's avatar Arvind Yadav Committed by Darren Hart (VMware)

platform/x86: alienware-wmi: 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
   6932	   1016	     48	   7996	   1f3c	drivers/platform/x86/alienware-wmi.o

File size After adding 'const':
   text	   data	    bss	    dec	    hex	filename
   7060	    888	     48	   7996	   1f64	drivers/platform/x86/alienware-wmi.o
Signed-off-by: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: default avatarDarren Hart (VMware) <dvhart@infradead.org>
parent 8546268e
...@@ -604,7 +604,7 @@ static struct attribute *hdmi_attrs[] = { ...@@ -604,7 +604,7 @@ static struct attribute *hdmi_attrs[] = {
NULL, NULL,
}; };
static struct attribute_group hdmi_attribute_group = { static const struct attribute_group hdmi_attribute_group = {
.name = "hdmi", .name = "hdmi",
.attrs = hdmi_attrs, .attrs = hdmi_attrs,
}; };
...@@ -660,7 +660,7 @@ static struct attribute *amplifier_attrs[] = { ...@@ -660,7 +660,7 @@ static struct attribute *amplifier_attrs[] = {
NULL, NULL,
}; };
static struct attribute_group amplifier_attribute_group = { static const struct attribute_group amplifier_attribute_group = {
.name = "amplifier", .name = "amplifier",
.attrs = amplifier_attrs, .attrs = amplifier_attrs,
}; };
...@@ -741,7 +741,7 @@ static struct attribute *deepsleep_attrs[] = { ...@@ -741,7 +741,7 @@ static struct attribute *deepsleep_attrs[] = {
NULL, NULL,
}; };
static struct attribute_group deepsleep_attribute_group = { static const struct attribute_group deepsleep_attribute_group = {
.name = "deepsleep", .name = "deepsleep",
.attrs = deepsleep_attrs, .attrs = deepsleep_attrs,
}; };
......
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