From: Bhumika Goyal Date: Sat, 11 Feb 2017 19:20:18 +0000 (+0530) Subject: clocksource/drivers/arm_arch_timer:: Mark cyclecounter __ro_after_init X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3d837bc01c2153565333b2ce71d613b6e7cc761c;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git clocksource/drivers/arm_arch_timer:: Mark cyclecounter __ro_after_init The object cyclecounter of type cyclecounter is only modified during initialization in arch_counter_register. So it can be marked __ro_after_init. Signed-off-by: Bhumika Goyal Cc: mark.rutland@arm.com Cc: keescook@chromium.org Cc: marc.zyngier@arm.com Cc: daniel.lezcano@linaro.org Cc: julia.lawall@lip6.fr Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1486840818-22214-1-git-send-email-bhumirks@gmail.com Signed-off-by: Thomas Gleixner --- diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c index 7b06aef83836..93aa1364376a 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c @@ -646,7 +646,7 @@ static struct clocksource clocksource_counter = { .flags = CLOCK_SOURCE_IS_CONTINUOUS, }; -static struct cyclecounter cyclecounter = { +static struct cyclecounter cyclecounter __ro_after_init = { .read = arch_counter_read_cc, .mask = CLOCKSOURCE_MASK(56), };