diff options
author | Arvind Yadav | 2017-08-02 16:51:08 +0530 |
---|---|---|
committer | Greg Kroah-Hartman | 2017-08-28 17:57:53 +0200 |
commit | ac317e276700a613057c34f10b2dc714c17d1b15 (patch) | |
tree | c4d7f6099de980b5adceea6224e90d7d61c0d70f /drivers/char | |
parent | c26bbb3ca9c4c58b886497efbeccac7cbd9e98a4 (diff) |
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>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/virtio_console.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index ad843eb02ae7..06bd6351e335 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -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, }; |