]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
wireless: iwlegacy: Constify attribute_group structures.
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Tue, 18 Jul 2017 09:45:02 +0000 (15:15 +0530)
committerDavid S. Miller <davem@davemloft.net>
Tue, 18 Jul 2017 19:04:56 +0000 (12:04 -0700)
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: David S. Miller <davem@davemloft.net>
drivers/net/wireless/intel/iwlegacy/4965-mac.c

index 5b51fba755954f2dbe910cf5b0d992ab2d37e0e8..de9b6522c43f5dba3855c0b4e94f57dd4b3915c5 100644 (file)
@@ -4654,7 +4654,7 @@ static struct attribute *il_sysfs_entries[] = {
        NULL
 };
 
-static struct attribute_group il_attribute_group = {
+static const struct attribute_group il_attribute_group = {
        .name = NULL,           /* put in device directory */
        .attrs = il_sysfs_entries,
 };