Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

char: virtio: constify attribute_group structures.

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>

authored by

Arvind Yadav and committed by
Greg Kroah-Hartman
ac317e27 c26bbb3c

+1 -1
+1 -1
drivers/char/virtio_console.c
··· 1308 1308 NULL 1309 1309 }; 1310 1310 1311 - static struct attribute_group port_attribute_group = { 1311 + static const struct attribute_group port_attribute_group = { 1312 1312 .name = NULL, /* put in device directory */ 1313 1313 .attrs = port_sysfs_entries, 1314 1314 };