Home
last modified time | relevance | path

Searched hist:"7 e72c686" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/rtc/
H A Drtc-twl.c7e72c686 Wed Aug 10 22:20:36 CDT 2011 Todd Poynor <toddpoynor@google.com> rtc: twl: Fix registration vs. init order

Only register as an RTC device after the hardware has been
successfully initialized. The RTC class driver will call
back to this driver to read a pending alarm, and other
drivers watching for new devices on the RTC class may
read the RTC time upon registration. Such access might
occur while the RTC is stopped, prior to clearing
pending alarms, etc.

The new ordering also avoids leaving the platform
device drvdata set to an unregistered struct rtc_device *
on probe errors.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
7e72c686 Wed Aug 10 22:20:36 CDT 2011 Todd Poynor <toddpoynor@google.com> rtc: twl: Fix registration vs. init order

Only register as an RTC device after the hardware has been
successfully initialized. The RTC class driver will call
back to this driver to read a pending alarm, and other
drivers watching for new devices on the RTC class may
read the RTC time upon registration. Such access might
occur while the RTC is stopped, prior to clearing
pending alarms, etc.

The new ordering also avoids leaving the platform
device drvdata set to an unregistered struct rtc_device *
on probe errors.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>