1
0
Fork 0

rtc: st-lpc: remove unnecessary check

The RTC core already ensures the alarm is set to a time in the future, it
is not necessary to check again in the driver.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
alistair/sunxi64-5.4-dsi
Alexandre Belloni 2019-04-30 22:18:34 +02:00
parent b3a5016976
commit d2bc4cece1
1 changed files with 0 additions and 4 deletions

View File

@ -166,10 +166,6 @@ static int st_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *t)
now_secs = rtc_tm_to_time64(&now);
alarm_secs = rtc_tm_to_time64(&t->time);
/* Invalid alarm time */
if (now_secs > alarm_secs)
return -EINVAL;
memcpy(&rtc->alarm, t, sizeof(struct rtc_wkalrm));
/* Now many secs to fire */