Skip to content

Commit c8fdd49

Browse files
Uwe Kleine-Königctmarinas
authored andcommitted
ARM64: make of_device_ids const
of_device_ids (i.e. compatible strings and the respective data) are not supposed to change at runtime. All functions working with of_device_ids provided by <linux/of.h> work with const of_device_ids. So mark the only non-const struct in arch/arm64 as const, too. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
1 parent 097cbd8 commit c8fdd49

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎arch/arm64/kernel/perf_event.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1276,7 +1276,7 @@ arch_initcall(cpu_pmu_reset);
12761276
/*
12771277
* PMU platform driver and devicetree bindings.
12781278
*/
1279-
static struct of_device_id armpmu_of_device_ids[] = {
1279+
static const struct of_device_id armpmu_of_device_ids[] = {
12801280
{.compatible = "arm,armv8-pmuv3"},
12811281
{},
12821282
};

0 commit comments

Comments
 (0)