Skip to content

Commit

Permalink
base: topology: constify attribute_group structures.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Arvind Yadav authored and Greg Kroah-Hartman committed Aug 28, 2017
1 parent 6ef2541 commit df44d30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/base/topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
};
Expand Down

0 comments on commit df44d30

Please sign in to comment.