Zhangfei Gao f945a3d960 rtc: max8925: Call dev_set_drvdata before rtc_device_register
We call rtc_read_alarm from rtc_device_register, so it is important
that the rtc device is fully initialized prior to registration.

rtc-max8925 sets drvdata after register, so the rtc_read_alarm code
dereferences a NULL pointer.

Call dev_set_drvdata before rtc_device_register.

[ jstultz/tglx: Massaged commit message ]

Signed-off-by: Zhangfei Gao <zhangfei.gao@marvell.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Link: http://lkml.kernel.org/r/%3C1303929869-25249-1-git-send-email-john.stultz%40linaro.org%3E
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-04-28 11:16:21 +02: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