mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
rtc: m41t80: do not use rtc_valid_tm in m41t80_rtc_read_alarm
Commit b485fe5ea ("rtc/m41t80: use rtc_valid_tm() to check returned tm")
added rtc_valid_tm to m41t80_rtc_read_alarm() but it was wrong while the
t->time does not contain complete date/time.
This patch also fixes a warning:
warning: passing argument 1 of 'rtc_valid_tm' from incompatible pointer type
Signed-off-by: Atsushi Nemoto <[email protected]>
Cc: Wan ZongShun <[email protected]>
Cc: Alessandro Zummo <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
ee3aebdd8f
commit
408929bed7
1 changed files with 1 additions and 1 deletions
|
|
@ -364,7 +364,7 @@ static int m41t80_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *t)
|
|||
t->time.tm_isdst = -1;
|
||||
t->enabled = !!(reg[M41T80_REG_ALARM_MON] & M41T80_ALMON_AFE);
|
||||
t->pending = !!(reg[M41T80_REG_FLAGS] & M41T80_FLAGS_AF);
|
||||
return rtc_valid_tm(t);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct rtc_class_ops m41t80_rtc_ops = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue