Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit ee6c54ca authored by Viresh Kumar's avatar Viresh Kumar Committed by Linus Torvalds
Browse files

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: default avatarViresh Kumar <viresh.kumar@st.com>
Cc: Shiraz Hashim <shiraz.hashim@st.com>
Cc: Deepak Sikri <deepak.sikri@st.com>
Acked-by: default avatarRajeev Kumar <rajeev-dlh.kumar@st.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 131f8b75
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment