HID: logitech-hidpp: constify attribute_group structures.
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Thu, 3 Aug 2017 11:29:04 +0000 (16:59 +0530)
committerJiri 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-logitech-hidpp.c

index 501e16a9227dc001df41d993aafb6fb092116752..614054af904a853b6060232df74c062bde22a249 100644 (file)
@@ -2926,7 +2926,7 @@ static struct attribute *sysfs_attrs[] = {
        NULL
 };
 
-static struct attribute_group ps_attribute_group = {
+static const struct attribute_group ps_attribute_group = {
        .attrs = sysfs_attrs
 };