From: Arvind Yadav Date: Thu, 3 Aug 2017 11:29:05 +0000 (+0530) Subject: HID: ntrig: constify attribute_group structures. X-Git-Tag: v4.14-rc1~140^2~5^2 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=1d710da2ee7b4c3d89efa16807ad0d9856107a17;p=linux.git HID: ntrig: constify attribute_group structures. attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Jiri Kosina --- diff --git a/drivers/hid/hid-ntrig.c b/drivers/hid/hid-ntrig.c index 1b0084d4af2e..3d121d8ee980 100644 --- 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 };