The patch titled Subject: drivers/rtc/class.c: initialize rtc name early has been added to the -mm tree. Its filename is rtc-initialize-rtc-name-early.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/rtc-initialize-rtc-name-early.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/rtc-initialize-rtc-name-early.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: Aaro Koskinen <aaro.koskinen@xxxxxx> Subject: drivers/rtc/class.c: initialize rtc name early In some error cases RTC name is used before it is initialized: rtc-rs5c372 0-0032: clock needs to be set rtc-rs5c372 0-0032: rs5c372b found, 24hr, driver version 0.6 rtc (null): read_time: fail to read rtc-rs5c372 0-0032: rtc core: registered rtc-rs5c372 as rtc0 Fix by initializing the name early. Signed-off-by: Aaro Koskinen <aaro.koskinen@xxxxxx> Cc: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxxxxxxxxx> Cc: Alessandro Zummo <a.zummo@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/rtc/class.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff -puN drivers/rtc/class.c~rtc-initialize-rtc-name-early drivers/rtc/class.c --- a/drivers/rtc/class.c~rtc-initialize-rtc-name-early +++ a/drivers/rtc/class.c @@ -225,15 +225,15 @@ struct rtc_device *rtc_device_register(c rtc->pie_timer.function = rtc_pie_update_irq; rtc->pie_enabled = 0; + strlcpy(rtc->name, name, RTC_DEVICE_NAME_SIZE); + dev_set_name(&rtc->dev, "rtc%d", id); + /* Check to see if there is an ALARM already set in hw */ err = __rtc_read_alarm(rtc, &alrm); if (!err && !rtc_valid_tm(&alrm.time)) rtc_initialize_alarm(rtc, &alrm); - strlcpy(rtc->name, name, RTC_DEVICE_NAME_SIZE); - dev_set_name(&rtc->dev, "rtc%d", id); - rtc_dev_prepare(rtc); err = device_register(&rtc->dev); _ Patches currently in -mm which might be from aaro.koskinen@xxxxxx are rtc-initialize-rtc-name-early.patch rtc-__rtc_read_time-reduce-log-level.patch rtc-hctosys-use-function-name-in-the-error-log.patch linux-next.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