Viresh Kumar ee6c54ca64 rtc/rtc-spear: call platform_set_drvdata() before registering rtc device
rtc_device_register() calls rtc-spear routines internally.  These
routines call dev_get_drvdata() to get struct spear_rtc_config.
Currently, platform_set_drvdata is called after rtc device is
registered.  This causes system to crash, as dev_get_drvdata returns
NULL.

For this we need to call platform_set_drvdata() before registering rtc
device.  This requires further cleanup, that leads to removal of
dev_set_drvdata on rtc->dev, which was just not required at all.

Also, we change the parameter to request_irq and pass pointer to config
instead of pointer to rtc struct.

This patch brings all above changes.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Cc: Shiraz Hashim <shiraz.hashim@st.com>
Cc: Deepak Sikri <deepak.sikri@st.com>
Acked-by: Rajeev Kumar <rajeev-dlh.kumar@st.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-23 16:58:39 -07:00
..
2009-02-11 14:25:36 -08:00
2011-06-01 19:29:39 -07:00
2011-03-22 17:44:16 -07:00
2009-04-01 08:59:24 -07:00
2011-08-26 17:26:35 -07:00
2009-04-02 01:05:32 +00:00
2011-05-26 17:12:33 -07:00
2008-11-21 01:24:38 -08:00
2008-11-14 16:37:54 -08:00