projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
47a6623
)
w1: constify attribute_group structures.
author
Arvind Yadav
<arvind.yadav.cs@gmail.com>
Fri, 28 Jul 2017 10:30:42 +0000
(16:00 +0530)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Mon, 28 Aug 2017 15:15:16 +0000
(17:15 +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/w1/w1.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/w1/w1.c
b/drivers/w1/w1.c
index 74471e7aa5cc42d82305967bc5a1795363fb5895..0f614dfcb09f1c09157816f0d9fa08d72dec0b95 100644
(file)
--- a/
drivers/w1/w1.c
+++ b/
drivers/w1/w1.c
@@
-568,7
+568,7
@@
static struct attribute *w1_master_default_attrs[] = {
NULL
};
-static struct attribute_group w1_master_defattr_group = {
+static
const
struct attribute_group w1_master_defattr_group = {
.attrs = w1_master_default_attrs,
};