Skip to content

Commit

Permalink
x86/mrst/vrtc: Fix boot crash in mrst_rtc_init()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Alan Cox <[email protected]>
Cc: Linus Torvalds <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
ftang1 authored and Ingo Molnar committed Apr 7, 2011
1 parent de97a21 commit 09552b2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion arch/x86/platform/mrst/vrtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 09552b2

Please sign in to comment.