aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeng Fan <[email protected]>2021-12-01 20:50:29 +0800
committerDaniel Lezcano <[email protected]>2021-12-09 14:13:04 +0100
commitf5bd5fc9d478cdb94f89ccc74870dd81d1919b42 (patch)
tree41f88476ae8b71e9f79b4b881e122cec4bfcaf97
parenta2807f657976b943bf0eb81d026398d28aa89863 (diff)
clocksource/drivers/imx-sysctr: Mark two variable with __ro_after_init
The variables 'sys_ctr_base' and 'cmpcr' are not be updated after init, so mark them as __ro_after_init. Cc: Kees Cook <[email protected]> Signed-off-by: Peng Fan <[email protected]> Reviewed-by: Kees Cook <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Daniel Lezcano <[email protected]>
-rw-r--r--drivers/clocksource/timer-imx-sysctr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/clocksource/timer-imx-sysctr.c b/drivers/clocksource/timer-imx-sysctr.c
index 18b90fc56bfc..2b309af11266 100644
--- a/drivers/clocksource/timer-imx-sysctr.c
+++ b/drivers/clocksource/timer-imx-sysctr.c
@@ -20,8 +20,8 @@
#define SYS_CTR_CLK_DIV 0x3
-static void __iomem *sys_ctr_base;
-static u32 cmpcr;
+static void __iomem *sys_ctr_base __ro_after_init;
+static u32 cmpcr __ro_after_init;
static void sysctr_timer_enable(bool enable)
{