Commit f74bed6a authored by Rikard Falkeborn's avatar Rikard Falkeborn Committed by Daniel Lezcano

thermal: core: Constify static attribute_group structs

The only usage of these structs is to assign their address to the
thermal_zone_attribute_groups array, which consists of pointers to
const, so make them const to allow the compiler to put them in read-only
memory.
Signed-off-by: default avatarRikard Falkeborn <rikard.falkeborn@gmail.com>
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20201128234342.36684-1-rikard.falkeborn@gmail.com
parent 90a99654
...@@ -425,7 +425,7 @@ static struct attribute *thermal_zone_dev_attrs[] = { ...@@ -425,7 +425,7 @@ static struct attribute *thermal_zone_dev_attrs[] = {
NULL, NULL,
}; };
static struct attribute_group thermal_zone_attribute_group = { static const struct attribute_group thermal_zone_attribute_group = {
.attrs = thermal_zone_dev_attrs, .attrs = thermal_zone_dev_attrs,
}; };
...@@ -434,7 +434,7 @@ static struct attribute *thermal_zone_mode_attrs[] = { ...@@ -434,7 +434,7 @@ static struct attribute *thermal_zone_mode_attrs[] = {
NULL, NULL,
}; };
static struct attribute_group thermal_zone_mode_attribute_group = { static const struct attribute_group thermal_zone_mode_attribute_group = {
.attrs = thermal_zone_mode_attrs, .attrs = thermal_zone_mode_attrs,
}; };
...@@ -468,7 +468,7 @@ static umode_t thermal_zone_passive_is_visible(struct kobject *kobj, ...@@ -468,7 +468,7 @@ static umode_t thermal_zone_passive_is_visible(struct kobject *kobj,
return 0; return 0;
} }
static struct attribute_group thermal_zone_passive_attribute_group = { static const struct attribute_group thermal_zone_passive_attribute_group = {
.attrs = thermal_zone_passive_attrs, .attrs = thermal_zone_passive_attrs,
.is_visible = thermal_zone_passive_is_visible, .is_visible = thermal_zone_passive_is_visible,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment