pcf2131: call inittodr() after late clock registration
The driver attaches via config_intrhook, which runs after the kernel's inittodr() has already failed with ENXIO. Re-invoke inittodr() after clock_register_flags() so the system time is set from the RTC.
This commit is contained in:
parent
0d00190958
commit
16e02dd356
1 changed files with 8 additions and 0 deletions
|
|
@ -297,6 +297,14 @@ pcf2131_start(void *arg)
|
|||
clockflags = CLOCKF_GETTIME_NO_ADJ | CLOCKF_SETTIME_NO_TS;
|
||||
clock_register_flags(dev, 1000000 / 2, clockflags);
|
||||
clock_schedule(dev, 495000000);
|
||||
|
||||
/*
|
||||
* This driver attaches via config_intrhook, which runs after
|
||||
* inittodr() has already failed with ENXIO (no clock registered).
|
||||
* Re-invoke inittodr() now that the clock is registered so the
|
||||
* system time gets set from the RTC.
|
||||
*/
|
||||
inittodr(0);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue