diff options
author | Rikard Falkeborn <rikard.falkeborn@gmail.com> | 2021-01-18 00:28:47 +0300 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2021-01-20 20:51:23 +0300 |
commit | f0c140481d1b807217cacdcf11d24cfa407a7a53 (patch) | |
tree | b73fe50bd0c88552f325139a3974dff93e7fe6dc /drivers/perf/arm_dmc620_pmu.c | |
parent | c2c4d5c051b23dd79ff82d6232347245e11d7c9c (diff) | |
download | linux-f0c140481d1b807217cacdcf11d24cfa407a7a53.tar.xz |
perf: Constify static struct attribute_group
The only usage is to put their addresses in an array of pointers to
const struct attribute group. Make them const to allow the compiler
to put them in read-only memory.
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20210117212847.21319-5-rikard.falkeborn@gmail.com
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'drivers/perf/arm_dmc620_pmu.c')
-rw-r--r-- | drivers/perf/arm_dmc620_pmu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/perf/arm_dmc620_pmu.c b/drivers/perf/arm_dmc620_pmu.c index 004930eb4bbb..27f54c0afc3b 100644 --- a/drivers/perf/arm_dmc620_pmu.c +++ b/drivers/perf/arm_dmc620_pmu.c @@ -159,7 +159,7 @@ static struct attribute *dmc620_pmu_events_attrs[] = { NULL, }; -static struct attribute_group dmc620_pmu_events_attr_group = { +static const struct attribute_group dmc620_pmu_events_attr_group = { .name = "events", .attrs = dmc620_pmu_events_attrs, }; @@ -222,7 +222,7 @@ static struct attribute *dmc620_pmu_formats_attrs[] = { NULL, }; -static struct attribute_group dmc620_pmu_format_attr_group = { +static const struct attribute_group dmc620_pmu_format_attr_group = { .name = "format", .attrs = dmc620_pmu_formats_attrs, }; |