projects
/
GitHub
/
moto-9609
/
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:
35a33cb
)
HID: ntrig: constify attribute_group structures.
author
Arvind Yadav
<arvind.yadav.cs@gmail.com>
Thu, 3 Aug 2017 11:29:05 +0000
(16:59 +0530)
committer
Jiri Kosina
<jkosina@suse.cz>
Thu, 3 Aug 2017 11:38:30 +0000
(13:38 +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: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-ntrig.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/hid/hid-ntrig.c
b/drivers/hid/hid-ntrig.c
index 1b0084d4af2e4b10b5af50cbb4a58306326de887..3d121d8ee980b28458021e591129ae369c813721 100644
(file)
--- a/
drivers/hid/hid-ntrig.c
+++ b/
drivers/hid/hid-ntrig.c
@@
-445,7
+445,7
@@
static struct attribute *sysfs_attrs[] = {
NULL
};
-static struct attribute_group ntrig_attribute_group = {
+static
const
struct attribute_group ntrig_attribute_group = {
.attrs = sysfs_attrs
};