aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzk@kernel.org>2016-12-10 08:47:35 -0500
committerKrzysztof Kozlowski <krzk@kernel.org>2016-12-29 08:40:29 -0500
commit552146b0c20d8265f7c570251c86fc4ec44959ee (patch)
treea1b8e34fa300a0ceb61650411d243bcaea7c726d
parentf3c7bfd738803915787bc8a6db663faa599e29f8 (diff)
ARM: s3c64xx: Annotate external clock frequencies __ro_after_init
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>
-rw-r--r--arch/arm/mach-s3c64xx/common.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/mach-s3c64xx/common.c b/arch/arm/mach-s3c64xx/common.c
index 7c66ce1a6bb6..9843eb4dd04e 100644
--- a/arch/arm/mach-s3c64xx/common.c
+++ b/arch/arm/mach-s3c64xx/common.c
@@ -56,7 +56,8 @@
56#include "watchdog-reset.h" 56#include "watchdog-reset.h"
57 57
58/* External clock frequency */ 58/* External clock frequency */
59static unsigned long xtal_f = 12000000, xusbxti_f = 48000000; 59static unsigned long xtal_f __ro_after_init = 12000000;
60static unsigned long xusbxti_f __ro_after_init = 48000000;
60 61
61void __init s3c64xx_set_xtal_freq(unsigned long freq) 62void __init s3c64xx_set_xtal_freq(unsigned long freq)
62{ 63{