From: Wolfram Sang Date: Wed, 25 May 2011 10:56:51 +0000 (+0200) Subject: rtc: stmp3xxx: Initialize drvdata before registering device X-Git-Tag: v3.1-rc1~295^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a91d2bab355f3a5caa767d7316f80422bfcd2ad6;p=pandora-kernel.git rtc: stmp3xxx: Initialize drvdata before registering device Commit f44f7f96a20 ("RTC: Initialize kernel state from RTC") uncovered an issue in a number of RTC drivers, where the drivers call rtc_device_register before initializing the device or platform drvdata. This frequently results in null pointer dereferences when the rtc_device_register immediately makes use of the rtc device, calling rtc_read_alarm. The solution is to ensure the drvdata is initialized prior to registering the rtc device. Signed-off-by: Wolfram Sang Tested-by: Shawn Guo Signed-off-by: John Stultz --- Reading git-diff-tree failed