Subject: + drivers-rtc-rtc-twlc-fix-rtc_reg_map-initialization.patch added to -mm tree To: peter.ujfalusi@xxxxxx,chf.fritz@xxxxxxxxxxxxxx,grygorii.strashko@xxxxxx,khilman@xxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Mon, 10 Jun 2013 14:49:24 -0700 The patch titled Subject: drivers/rtc/rtc-twl.c: fix rtc_reg_map initialization has been added to the -mm tree. Its filename is drivers-rtc-rtc-twlc-fix-rtc_reg_map-initialization.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Peter Ujfalusi <peter.ujfalusi@xxxxxx> Subject: drivers/rtc/rtc-twl.c: fix rtc_reg_map initialization Initialize the rtc_reg_map in platform_driver's probe function instead at module_init time. This way we can make sure that the twl-core has been already probed and initialized (twl_priv->twl_id is valid) since the platform device for the RTC driver will be created by the twl-core after it finished its init. Reported-by: Christoph Fritz <chf.fritz@xxxxxxxxxxxxxx> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@xxxxxx> Tested-by: Kevin Hilman <khilman@xxxxxxxxxx> Tested-by: Grygorii Strashko <grygorii.strashko@xxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/rtc/rtc-twl.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff -puN drivers/rtc/rtc-twl.c~drivers-rtc-rtc-twlc-fix-rtc_reg_map-initialization drivers/rtc/rtc-twl.c --- a/drivers/rtc/rtc-twl.c~drivers-rtc-rtc-twlc-fix-rtc_reg_map-initialization +++ a/drivers/rtc/rtc-twl.c @@ -481,6 +481,12 @@ static int twl_rtc_probe(struct platform if (irq <= 0) goto out1; + /* Initialize the register map */ + if (twl_class_is_4030()) + rtc_reg_map = (u8 *)twl4030_rtc_reg_map; + else + rtc_reg_map = (u8 *)twl6030_rtc_reg_map; + ret = twl_rtc_read_u8(&rd_reg, REG_RTC_STATUS_REG); if (ret < 0) goto out1; @@ -622,11 +628,6 @@ static struct platform_driver twl4030rtc static int __init twl_rtc_init(void) { - if (twl_class_is_4030()) - rtc_reg_map = (u8 *) twl4030_rtc_reg_map; - else - rtc_reg_map = (u8 *) twl6030_rtc_reg_map; - return platform_driver_register(&twl4030rtc_driver); } module_init(twl_rtc_init); _ Patches currently in -mm which might be from peter.ujfalusi@xxxxxx are drivers-rtc-rtc-twlc-fix-rtc_reg_map-initialization.patch drivers-rtc-rtc-twlc-cleanup-with-module_platform_driver-conversion.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html