rtc: move preinit call to RTC_Initialise()

This commit is contained in:
Miroslav Lichvar
2014-08-18 11:25:16 +02:00
parent c52e9085d1
commit c6e064200d
3 changed files with 9 additions and 20 deletions

20
rtc.c
View File

@@ -74,10 +74,16 @@ static struct {
/* ================================================== */
void
RTC_Initialise(void)
RTC_Initialise(int initial_set)
{
char *file_name;
/* Do an initial read of the RTC and set the system time to it. This
is analogous to what /sbin/hwclock -s would do on Linux. */
if (initial_set && driver.time_pre_init) {
(driver.time_pre_init)();
}
driver_initialised = 0;
/* This is how we tell whether the user wants to load the RTC
@@ -130,18 +136,6 @@ RTC_TimeInit(void (*after_hook)(void *), void *anything)
}
}
/* ================================================== */
/* Do an initial read of the RTC and set the system time to it. This
is analogous to what /sbin/hwclock -s would do on Linux. */
void
RTC_TimePreInit(void)
{
if (driver.time_pre_init) {
(driver.time_pre_init)();
}
}
/* ================================================== */
/* Start the RTC measurement process */