projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb23d91
)
PM: sleep: Constify static struct attribute_group
author
Rikard Falkeborn
<rikard.falkeborn@gmail.com>
Mon, 1 Feb 2021 22:57:35 +0000
(23:57 +0100)
committer
Rafael J. Wysocki
<rafael.j.wysocki@intel.com>
Fri, 12 Feb 2021 15:46:59 +0000
(16:46 +0100)
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>
kernel/power/main.c
patch
|
blob
|
history
diff --git
a/kernel/power/main.c
b/kernel/power/main.c
index
0aefd6f
..
12c7e1b
100644
(file)
--- 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,
};