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:
9182fb9
)
HID: sensor: constify attribute_group structures.
author
Arvind Yadav
<arvind.yadav.cs@gmail.com>
Thu, 3 Aug 2017 11:28:35 +0000
(16:58 +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-sensor-custom.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/hid/hid-sensor-custom.c
b/drivers/hid/hid-sensor-custom.c
index 3a84aaf1418b45c725531903b41e29ae4ce62236..fb86f86b9d92261efbe62afa8e58cd1b97a882e4 100644
(file)
--- a/
drivers/hid/hid-sensor-custom.c
+++ b/
drivers/hid/hid-sensor-custom.c
@@
-276,7
+276,7
@@
static struct attribute *enable_sensor_attrs[] = {
NULL,
};
-static struct attribute_group enable_sensor_attr_group = {
+static
const
struct attribute_group enable_sensor_attr_group = {
.attrs = enable_sensor_attrs,
};