diff options
author | Arvind Yadav <arvind.yadav.cs@gmail.com> | 2017-08-02 14:21:08 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-08-28 18:57:53 +0300 |
commit | ac317e276700a613057c34f10b2dc714c17d1b15 (patch) | |
tree | c4d7f6099de980b5adceea6224e90d7d61c0d70f /drivers/char | |
parent | c26bbb3ca9c4c58b886497efbeccac7cbd9e98a4 (diff) | |
download | linux-ac317e276700a613057c34f10b2dc714c17d1b15.tar.xz |
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, }; |