projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9045f18
)
misc: lis3lv02d: constify attribute_group structures.
author
Arvind Yadav
<
[email protected]
>
Fri, 4 Aug 2017 06:37:56 +0000
(12:07 +0530)
committer
Greg Kroah-Hartman
<
[email protected]
>
Mon, 28 Aug 2017 14:55:48 +0000
(16:55 +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 <
[email protected]
>
Signed-off-by: Greg Kroah-Hartman <
[email protected]
>
drivers/misc/lis3lv02d/lis3lv02d.c
patch
|
blob
|
history
diff --git
a/drivers/misc/lis3lv02d/lis3lv02d.c
b/drivers/misc/lis3lv02d/lis3lv02d.c
index e389b0b5278d56d238365ab5f7b8440105ec090f..8d53609861d86fb6d5afc9954764917d68c7c5ad 100644
(file)
--- a/
drivers/misc/lis3lv02d/lis3lv02d.c
+++ b/
drivers/misc/lis3lv02d/lis3lv02d.c
@@
-856,7
+856,7
@@
static struct attribute *lis3lv02d_attributes[] = {
NULL
};
-static struct attribute_group lis3lv02d_attribute_group = {
+static
const
struct attribute_group lis3lv02d_attribute_group = {
.attrs = lis3lv02d_attributes
};