diff options
author | Uwe Kleine-König <uwe@kleine-koenig.org> | 2016-07-11 10:05:27 +0200 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2016-07-19 18:15:21 +0200 |
commit | d2c92705c54c9c24f2b8be57b968ad21a30412e5 (patch) | |
tree | ef386f3b15925c3d1b1d8aebf4e0e774ec7f74cd /drivers/rtc/rtc-davinci.c | |
parent | rtc: s3c: Add s3c_rtc_{enable/disable}_clk in s3c_rtc_setfreq() (diff) | |
download | linux-d2c92705c54c9c24f2b8be57b968ad21a30412e5.tar.xz linux-d2c92705c54c9c24f2b8be57b968ad21a30412e5.zip |
rtc: explicitly set tm_sec = 0 for drivers with minute accurancy
Since all time members of the alarm data is initialized to -1 the drivers
are responsible to set the tm_sec member to 0.
Fixes: d68778b80dd7 ("rtc: initialize output parameter for read alarm to "uninitialized"")
Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Diffstat (limited to 'drivers/rtc/rtc-davinci.c')
-rw-r--r-- | drivers/rtc/rtc-davinci.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-davinci.c b/drivers/rtc/rtc-davinci.c index c5432bf64e1c..dba60c1dfce2 100644 --- a/drivers/rtc/rtc-davinci.c +++ b/drivers/rtc/rtc-davinci.c @@ -388,6 +388,8 @@ static int davinci_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm) u8 day0, day1; unsigned long flags; + alm->time.tm_sec = 0; + spin_lock_irqsave(&davinci_rtc_lock, flags); davinci_rtcss_calendar_wait(davinci_rtc); |