summaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorRikard Falkeborn <rikard.falkeborn@gmail.com>2021-01-13 23:32:43 +0300
committerSebastian Reichel <sebastian.reichel@collabora.com>2021-01-14 00:11:44 +0300
commit2f7cf24f420522ddf7575d76753007407293ecc0 (patch)
tree9fc459d4359d932cd626f18c1394b0780065663a /drivers/power
parent249aacc6a30f8e957394a2781a8a40150ecbc04f (diff)
downloadlinux-2f7cf24f420522ddf7575d76753007407293ecc0.tar.xz
power: supply: core: Constify static struct attribute_group
The only usage of it is to put its address in an array of pointers to const static structs. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/supply/power_supply_sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/supply/power_supply_sysfs.c b/drivers/power/supply/power_supply_sysfs.c
index 92dd63171193..c3d7cbcd4fad 100644
--- a/drivers/power/supply/power_supply_sysfs.c
+++ b/drivers/power/supply/power_supply_sysfs.c
@@ -374,7 +374,7 @@ static umode_t power_supply_attr_is_visible(struct kobject *kobj,
return 0;
}
-static struct attribute_group power_supply_attr_group = {
+static const struct attribute_group power_supply_attr_group = {
.attrs = __power_supply_attrs,
.is_visible = power_supply_attr_is_visible,
};