Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c5776dec authored by Heinrich Schuchardt's avatar Heinrich Schuchardt Committed by Alexandre Belloni
Browse files

rtc: ds1685: correct day of month checking



The day of month is checked in ds1685_rtc_read_alarm
and ds1685_rtc_set_alarm.

Multiple errors exist in the day of month check.

Operator ! has a higher priority than &&.
(!(mday >= 1) && (mday <= 31)) is false for mday == 32.

When verifying the day of month the binary and the BCD mode
have to be considered.

Signed-off-by: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
parent 2b2f5ff0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment