diff options
author | Arvind Yadav <arvind.yadav.cs@gmail.com> | 2017-07-18 10:10:54 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-07-28 06:33:22 +0200 |
commit | 1722270bb40208ad5744bd80278f10c7c1c639f5 (patch) | |
tree | 7e8df075a990176a66761e16d093641f7b5ca6cc | |
parent | Merge tag 'iio-for-4.14a' of git://git.kernel.org/pub/scm/linux/kernel/git/ji... (diff) | |
download | linux-1722270bb40208ad5744bd80278f10c7c1c639f5.tar.xz linux-1722270bb40208ad5744bd80278f10c7c1c639f5.zip |
staging: unisys: visorbus: 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>
-rw-r--r-- | drivers/staging/unisys/visorbus/visorbus_main.c | 4 | ||||
-rw-r--r-- | 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 }; |