Skip to content

Commit 58ee3e0

Browse files
ArvindYadavCsJiri Kosina
authored andcommitted
HID: sensor: constify attribute_group structures.
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: Jiri Kosina <[email protected]>
1 parent 9182fb9 commit 58ee3e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hid/hid-sensor-custom.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ static struct attribute *enable_sensor_attrs[] = {
276276
NULL,
277277
};
278278

279-
static struct attribute_group enable_sensor_attr_group = {
279+
static const struct attribute_group enable_sensor_attr_group = {
280280
.attrs = enable_sensor_attrs,
281281
};
282282

0 commit comments

Comments
 (0)