projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a70df96
)
usb: chipidea: constify attribute_group structures.
author
Arvind Yadav
<arvind.yadav.cs@gmail.com>
Fri, 4 Aug 2017 12:06:38 +0000
(17:36 +0530)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 10 Aug 2017 18:31:28 +0000
(11:31 -0700)
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/usb/chipidea/core.c
patch
|
blob
|
history
diff --git
a/drivers/usb/chipidea/core.c
b/drivers/usb/chipidea/core.c
index b17ed3a9a3045ff9d9c88aacca3d8b1ffc98a06e..1ef3ae4dc908fcc93e98e5226cf01733332fdbb4 100644
(file)
--- a/
drivers/usb/chipidea/core.c
+++ b/
drivers/usb/chipidea/core.c
@@
-887,7
+887,7
@@
static struct attribute *ci_attrs[] = {
NULL,
};
-static struct attribute_group ci_attr_group = {
+static
const
struct attribute_group ci_attr_group = {
.attrs = ci_attrs,
};