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: d68778b80d
("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>
This commit is contained in:

کامیت شده توسط
Alexandre Belloni

والد
70c96dfac0
کامیت
d2c92705c5
@@ -74,6 +74,7 @@ static int da9055_read_alarm(struct da9055 *da9055, struct rtc_time *rtc_tm)
|
||||
rtc_tm->tm_mday = v[2] & DA9055_RTC_ALM_DAY;
|
||||
rtc_tm->tm_hour = v[1] & DA9055_RTC_ALM_HOUR;
|
||||
rtc_tm->tm_min = v[0] & DA9055_RTC_ALM_MIN;
|
||||
rtc_tm->tm_sec = 0;
|
||||
|
||||
return rtc_valid_tm(rtc_tm);
|
||||
}
|
||||
|
مرجع در شماره جدید
Block a user