ARM: s3c64xx: Annotate external clock frequencies __ro_after_init
authorKrzysztof Kozlowski <krzk@kernel.org>
Sat, 10 Dec 2016 13:47:35 +0000 (15:47 +0200)
committerKrzysztof Kozlowski <krzk@kernel.org>
Thu, 29 Dec 2016 13:40:29 +0000 (15:40 +0200)
The xtal_f and xusbxti_f static variables are modified only through
__init accessors (like s3c64xx_set_xtal_freq()).  Later these variables
are used only in read-only way so we can mark them __ro_after_init to
increase code safeness.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
arch/arm/mach-s3c64xx/common.c

index 7c66ce1a6bb69276a8576147a9a5fd7fdf4acc59..9843eb4dd04ee05a4377fc8727d0836b35245d65 100644 (file)
@@ -56,7 +56,8 @@
 #include "watchdog-reset.h"
 
 /* External clock frequency */
-static unsigned long xtal_f = 12000000, xusbxti_f = 48000000;
+static unsigned long xtal_f __ro_after_init = 12000000;
+static unsigned long xusbxti_f __ro_after_init = 48000000;
 
 void __init s3c64xx_set_xtal_freq(unsigned long freq)
 {