base: topology: constify attribute_group structures.
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Wed, 2 Aug 2017 14:06:20 +0000 (19:36 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Aug 2017 15:49:22 +0000 (17:49 +0200)
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/topology.c

index d6ec1c546f5b485fae183d51df23189481b568ec..d936fcf9f1fb985033a28092209d297721d5bfb4 100644 (file)
@@ -105,7 +105,7 @@ static struct attribute *default_attrs[] = {
        NULL
 };
 
-static struct attribute_group topology_attr_group = {
+static const struct attribute_group topology_attr_group = {
        .attrs = default_attrs,
        .name = "topology"
 };