summaryrefslogtreecommitdiff
path: root/drivers/base/platform.c
diff options
context:
space:
mode:
authorRikard Falkeborn <rikard.falkeborn@gmail.com>2021-05-28 23:34:08 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-06-04 15:06:28 +0200
commit5a576764e4190f7b48cf3cf40f4294f001918605 (patch)
tree8467e31ccac33478f872e136bfe3757eea9ef670 /drivers/base/platform.c
parent7f787701b2981d1a22f3951612fbb5a97ee658d3 (diff)
drivers/base: Constify static attribute_group structs
These are only used by putting their address in an array of pointers to const struct attribute_group (either directly or via the __ATTRIBUTE_GROUP macro). Make them const to allow the compiler to place them in read-only memory. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Link: https://lore.kernel.org/r/20210528213408.20067-1-rikard.falkeborn@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/platform.c')
-rw-r--r--drivers/base/platform.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index ae071e8ed665..8640578f45e9 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -1335,7 +1335,7 @@ static umode_t platform_dev_attrs_visible(struct kobject *kobj, struct attribute
return a->mode;
}
-static struct attribute_group platform_dev_group = {
+static const struct attribute_group platform_dev_group = {
.attrs = platform_dev_attrs,
.is_visible = platform_dev_attrs_visible,
};