Wolfram Sang 5f54c8a00a rtc: mxc: 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.

CC: Alessandro Zummo <a.zummo@towertech.it>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: rtc-linux@googlegroups.com
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
[fixed up commit log -jstultz]
Signed-off-by: John Stultz <john.stultz@linaro.org>
2011-05-06 17:40:10 -07:00
..
2011-03-31 11:26:23 -03:00
2009-02-11 14:25:36 -08:00
2009-02-05 12:56:46 -08:00
2011-03-22 17:44:16 -07:00
2009-04-01 08:59:24 -07:00
2011-03-31 11:26:23 -03:00
2011-01-14 12:38:16 +01:00
2011-02-03 13:02:50 -08:00
2009-04-02 01:05:32 +00:00
2009-09-23 07:39:43 -07:00
2011-02-03 13:02:50 -08:00
2008-11-21 01:24:38 -08:00
2008-11-14 16:37:54 -08:00
2011-03-31 11:26:23 -03:00