diff options
| author | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2019-04-11 01:16:29 +0300 |
|---|---|---|
| committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2019-05-23 18:53:03 +0300 |
| commit | b3a50169762b14102a296a410d785f9ec1132ae1 (patch) | |
| tree | 1eef64d1c9fb772200ad736dda2b2ef6fea4a753 /net/lapb/lapb_subr.c | |
| parent | 097aa24b5db09a852516c467f2cd62e8adfd6bba (diff) | |
| download | linux-b3a50169762b14102a296a410d785f9ec1132ae1.tar.xz | |
rtc: ds1307: properly handle oscillator failure flags
Stop enabling the oscillator and removing the oscillator failure flags in
probe. Instead, return -EINVAL in .read_time when the oscillaotr is not
start or when it failed at some point. The oscillator gets enabled on the
first .set_time after failure and the failure flags are cleared.
This also removes the possibility of an infinite loop at probe where a
failing RTC will make the goto read_rtc to be taken every time.
Tested on mcp79411.
Reported-by: Mastro Gippo <gipmad@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'net/lapb/lapb_subr.c')
0 files changed, 0 insertions, 0 deletions
