Input: yealink - constify attribute_group structures
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Tue, 11 Jul 2017 03:21:06 +0000 (20:21 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 12 Jul 2017 21:18:30 +0000 (14:18 -0700)
attribute_groups are not supposed to change at runtime. All functions
working with attribute_groups provided by <linux/sysfs.h> work with const
attribute_group. So mark the non-const structs as const.

File size before:
   text    data     bss     dec     hex filename
   6039     944       0    6983    1b47 drivers/input/misc/yealink.o

File size After adding 'const':
   text    data     bss     dec     hex filename
   6103     880       0    6983    1b47 drivers/input/misc/yealink.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Henk Vergonet <henk.vergonet@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/yealink.c

index 6e7ff9561d9261f31f919720925e12d8f1720b98..a1e0ff59d2f23095873d123b2e252c2466b68573 100644 (file)
@@ -798,7 +798,7 @@ static struct attribute *yld_attributes[] = {
        NULL
 };
 
-static struct attribute_group yld_attr_group = {
+static const struct attribute_group yld_attr_group = {
        .attrs = yld_attributes
 };