projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6ef2541
)
base: topology: constify attribute_group structures.
author
Arvind Yadav
<arvind.yadav.cs@gmail.com>
Wed, 2 Aug 2017 14:06:20 +0000
(19:36 +0530)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Mon, 28 Aug 2017 15:49:22 +0000
(17:49 +0200)
attribute_group are not supposed to change at runtime. All functions
working with attribute_group provided by <linux/sysfs.h> work with
const attribute_group. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/topology.c
patch
|
blob
|
history
diff --git
a/drivers/base/topology.c
b/drivers/base/topology.c
index d6ec1c546f5b485fae183d51df23189481b568ec..d936fcf9f1fb985033a28092209d297721d5bfb4 100644
(file)
--- a/
drivers/base/topology.c
+++ b/
drivers/base/topology.c
@@
-105,7
+105,7
@@
static struct attribute *default_attrs[] = {
NULL
};
-static struct attribute_group topology_attr_group = {
+static
const
struct attribute_group topology_attr_group = {
.attrs = default_attrs,
.name = "topology"
};