From 1722270bb40208ad5744bd80278f10c7c1c639f5 Mon Sep 17 00:00:00 2001 From: Arvind Yadav Date: Tue, 18 Jul 2017 13:40:54 +0530 Subject: [PATCH] staging: unisys: visorbus: Constify attribute_group structures. attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman --- drivers/staging/unisys/visorbus/visorbus_main.c | 4 ++-- drivers/staging/unisys/visorbus/visorchipset.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c index 9012cc1a8902..ff80ab248a35 100644 --- a/drivers/staging/unisys/visorbus/visorbus_main.c +++ b/drivers/staging/unisys/visorbus/visorbus_main.c @@ -294,7 +294,7 @@ static struct attribute *channel_attrs[] = { NULL }; -static struct attribute_group channel_attr_grp = { +static const struct attribute_group channel_attr_grp = { .name = "channel", .attrs = channel_attrs, }; @@ -391,7 +391,7 @@ static struct attribute *dev_attrs[] = { NULL }; -static struct attribute_group dev_attr_grp = { +static const struct attribute_group dev_attr_grp = { .attrs = dev_attrs, }; diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c index 87ea852bab01..6d4498f4de66 100644 --- a/drivers/staging/unisys/visorbus/visorchipset.c +++ b/drivers/staging/unisys/visorbus/visorchipset.c @@ -1138,7 +1138,7 @@ static struct attribute *visorchipset_parahotplug_attrs[] = { NULL }; -static struct attribute_group visorchipset_parahotplug_group = { +static const struct attribute_group visorchipset_parahotplug_group = { .name = "parahotplug", .attrs = visorchipset_parahotplug_attrs }; -- 2.20.1