mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 2/2] x86/vrtc: fix a bug in mrst_rtc_init()
@ 2011-04-07  1:39 Feng Tang
  2011-04-07  9:49 ` [tip:timers/urgent] x86/mrst/vrtc: Fix boot crash " tip-bot for Feng Tang
  0 siblings, 1 reply; 2+ messages in thread
From: Feng Tang @ 2011-04-07  1:39 UTC (permalink / raw)
  To: linux-kernel, tglx, mingo, hpa, alan; +Cc: Feng Tang

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>
---
 arch/x86/platform/mrst/vrtc.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/x86/platform/mrst/vrtc.c b/arch/x86/platform/mrst/vrtc.c
index 04cf645..73d70d6 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)
 
 void __init mrst_rtc_init(void)
 {
-	unsigned long vrtc_paddr = sfi_mrtc_array[0].phys_addr;
+	unsigned long vrtc_paddr;
 
 	sfi_table_parse(SFI_SIG_MRTC, NULL, NULL, sfi_parse_mrtc);
+
+	vrtc_paddr = sfi_mrtc_array[0].phys_addr;
 	if (!sfi_mrtc_num || !vrtc_paddr)
 		return;
 
-- 
1.7.0.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-04-07  9:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-07  1:39 [PATCH 2/2] x86/vrtc: fix a bug in mrst_rtc_init() Feng Tang
2011-04-07  9:49 ` [tip:timers/urgent] x86/mrst/vrtc: Fix boot crash " tip-bot for Feng Tang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®