diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-12-20 05:18:36 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-12-24 04:49:51 -0500 |
commit | 8ff1443c5439ecee7472b80cf12ecfc337e6ee98 (patch) | |
tree | b6899444bc0b66a016d29271c5d70e8ad43db5ca /arch/arm/kernel/time.c | |
parent | cd544ce754ac2432ffcc0626ea802d2b30876b50 (diff) |
ARM: simplify early machine init hooks
Rather than storing each machine init hook separately, store a
pointer to the machine description record and dereference this
instead. This pointer is only available while the init sections
are present, which is not a problem as we only use it from init
code.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/time.c')
-rw-r--r-- | arch/arm/kernel/time.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c index 38c261f9951c..f1e2eb19a67d 100644 --- a/arch/arm/kernel/time.c +++ b/arch/arm/kernel/time.c | |||
@@ -30,12 +30,13 @@ | |||
30 | #include <asm/leds.h> | 30 | #include <asm/leds.h> |
31 | #include <asm/thread_info.h> | 31 | #include <asm/thread_info.h> |
32 | #include <asm/stacktrace.h> | 32 | #include <asm/stacktrace.h> |
33 | #include <asm/mach/arch.h> | ||
33 | #include <asm/mach/time.h> | 34 | #include <asm/mach/time.h> |
34 | 35 | ||
35 | /* | 36 | /* |
36 | * Our system timer. | 37 | * Our system timer. |
37 | */ | 38 | */ |
38 | struct sys_timer *system_timer; | 39 | static struct sys_timer *system_timer; |
39 | 40 | ||
40 | #if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE) | 41 | #if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE) |
41 | /* this needs a better home */ | 42 | /* this needs a better home */ |
@@ -160,6 +161,7 @@ device_initcall(timer_init_sysfs); | |||
160 | 161 | ||
161 | void __init time_init(void) | 162 | void __init time_init(void) |
162 | { | 163 | { |
164 | system_timer = machine_desc->timer; | ||
163 | system_timer->init(); | 165 | system_timer->init(); |
164 | } | 166 | } |
165 | 167 | ||