Skip to content

Commit

Permalink
char: virtio: 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 c26bbb3 commit ac317e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/char/virtio_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -1308,7 +1308,7 @@ static struct attribute *port_sysfs_entries[] = {
NULL
};

static struct attribute_group port_attribute_group = {
static const struct attribute_group port_attribute_group = {
.name = NULL, /* put in device directory */
.attrs = port_sysfs_entries,
};
Expand Down

0 comments on commit ac317e2

Please sign in to comment.