summaryrefslogtreecommitdiff
path: root/kernel/power
diff options
context:
space:
mode:
authorRikard Falkeborn <rikard.falkeborn@gmail.com>2021-02-01 23:57:35 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2021-02-12 16:46:59 +0100
commit1556057413a304b3020180240d798ec135d90844 (patch)
tree8193e006341b2609a240d0d2da7f17de7f27448d /kernel/power
parenteb23d91af55bc2369fe3f0aa6997e72eb20e16fe (diff)
PM: sleep: Constify static struct attribute_group
The only usage of suspend_attr_group is to put its address in an array of pointers to const attribute_group structs. Make it const to allow the compiler to put it into read-only memory. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'kernel/power')
-rw-r--r--kernel/power/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/power/main.c b/kernel/power/main.c
index 0aefd6f57e0a..12c7e1bb442f 100644
--- a/kernel/power/main.c
+++ b/kernel/power/main.c
@@ -387,7 +387,7 @@ static struct attribute *suspend_attrs[] = {
NULL,
};
-static struct attribute_group suspend_attr_group = {
+static const struct attribute_group suspend_attr_group = {
.name = "suspend_stats",
.attrs = suspend_attrs,
};