2011-05-27 02:06:26

by Hartley Sweeten

[permalink] [raw]
Subject: Problem with patch rtc: ep93xx: Initialize drvdata before registering device

Wolfram,

I think there is a problem with your patch:

commit 92d921c5def1a7b1411bc54859c0771b2cf2c08d
rtc: ep93xx: Initialize drvdata before registering device

You are calling platform_set_drvdata() with rtc == NULL at best, it
could possibly also be garbage. The rtc variable is allocated in
rtc_device_register().

A couple printk's prove this out:

ep93xx_rtc_probe: before platform_set_drvdata -> rtc: (null)
ep93xx-rtc ep93xx-rtc: rtc core: registered ep93xx-rtc as rtc0
ep93xx_rtc_probe: after rtc_device_register -> rtc: c4789c00

Regards,
Hartley????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?