aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorFeng Tang <feng.tang@intel.com>2011-04-06 21:39:49 -0400
committerIngo Molnar <mingo@elte.hu>2011-04-07 05:27:42 -0400
commit09552b2696896dbb715be0caf91b23276f9139ba (patch)
tree62998cffed4b19591aa0ea61778e018d00feed8b /arch
parentde97a21a23dda34f1754a748560dede139e6bfc2 (diff)
x86/mrst/vrtc: Fix boot crash in mrst_rtc_init()
The sfi_mrtc_array[] only gets initialized when the sfi mrtc table is parsed, so the vrtc_paddr should be initalized after it too. Signed-off-by: Feng Tang <feng.tang@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: http://lkml.kernel.org/r/1302140389-27603-1-git-send-email-feng.tang@intel.com Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/platform/mrst/vrtc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/platform/mrst/vrtc.c b/arch/x86/platform/mrst/vrtc.c
index 04cf645feb92..73d70d65e76e 100644
--- a/arch/x86/platform/mrst/vrtc.c
+++ b/arch/x86/platform/mrst/vrtc.c
@@ -100,9 +100,11 @@ int vrtc_set_mmss(unsigned long nowtime)
100 100
101void __init mrst_rtc_init(void) 101void __init mrst_rtc_init(void)
102{ 102{
103 unsigned long vrtc_paddr = sfi_mrtc_array[0].phys_addr; 103 unsigned long vrtc_paddr;
104 104
105 sfi_table_parse(SFI_SIG_MRTC, NULL, NULL, sfi_parse_mrtc); 105 sfi_table_parse(SFI_SIG_MRTC, NULL, NULL, sfi_parse_mrtc);
106
107 vrtc_paddr = sfi_mrtc_array[0].phys_addr;
106 if (!sfi_mrtc_num || !vrtc_paddr) 108 if (!sfi_mrtc_num || !vrtc_paddr)
107 return; 109 return;
108 110