]> git.baikalelectronics.ru Git - kernel.git/commit
rtc, x86/mrst/vrtc: Fix boot crash in rtc_read_alarm()
authorFeng Tang <feng.tang@intel.com>
Thu, 7 Apr 2011 01:39:44 +0000 (09:39 +0800)
committerIngo Molnar <mingo@elte.hu>
Thu, 7 Apr 2011 09:27:42 +0000 (11:27 +0200)
commit68d3ac563273f9f183319e6ce1964dfbe2d742ff
tree7d6300b10d5b105c39e8d2857075a646a242a974
parentc708219c35f9a13c0f60b11e124f384982303c71
rtc, x86/mrst/vrtc: Fix boot crash in rtc_read_alarm()

Commit 7a6b0e5dea5 ("RTC: Initialize kernel state from RTC") caused a
boot regression on the MRST platform.

The reason is that rtc_device_register() calls rtc_read_alarm() after
that change, which function does not have all driver data set up yet.

The rtc-mrst driver needs to call dev_set_drvdata() before rtc_device_register()
gets called.

Signed-off-by: Feng Tang <feng.tang@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Acked-by: John Stultz <john.stultz@linaro.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/1302140384-27571-1-git-send-email-feng.tang@intel.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
drivers/rtc/rtc-mrst.c