]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
arm64: cpuinfo: constify attribute_group structures.
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Fri, 30 Jun 2017 11:30:20 +0000 (17:00 +0530)
committerWill Deacon <will.deacon@arm.com>
Fri, 30 Jun 2017 12:34:11 +0000 (13:34 +0100)
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.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/kernel/cpuinfo.c

index 68b1f364c515bac13514ce1484731a48cb842184..f495ee5049fd767c3a1bd1f555599167f9a1a1f1 100644 (file)
@@ -227,7 +227,7 @@ static struct attribute *cpuregs_id_attrs[] = {
        NULL
 };
 
-static struct attribute_group cpuregs_attr_group = {
+static const struct attribute_group cpuregs_attr_group = {
        .attrs = cpuregs_id_attrs,
        .name = "identification"
 };