From: Arvind Yadav Date: Tue, 11 Jul 2017 10:48:18 +0000 (+0530) Subject: platform/x86: panasonic-laptop: constify attribute_group structures. X-Git-Tag: v4.13-rc1~38^2~3 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=24f584055c360d39cb55e91a7a1c53ddeb4a6147;p=linux.git platform/x86: panasonic-laptop: constify attribute_group structures. attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 2505 600 4 3109 c25 drivers/platform/x86/panasonic-laptop.o File size After adding 'const': text data bss dec hex filename 2569 536 4 3109 c25 drivers/platform/x86/panasonic-laptop.o Signed-off-by: Arvind Yadav Signed-off-by: Darren Hart (VMware) --- diff --git a/drivers/platform/x86/panasonic-laptop.c b/drivers/platform/x86/panasonic-laptop.c index 76b0a58e205b..5c39b3211709 100644 --- a/drivers/platform/x86/panasonic-laptop.c +++ b/drivers/platform/x86/panasonic-laptop.c @@ -437,7 +437,7 @@ static struct attribute *pcc_sysfs_entries[] = { NULL, }; -static struct attribute_group pcc_attr_group = { +static const struct attribute_group pcc_attr_group = { .name = NULL, /* put in device directory */ .attrs = pcc_sysfs_entries, };