commit | c5776dec8f2a90a0aa9e197c2900f68fda8dd978 | [log] [tgz] |
---|---|---|
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | Sun May 22 00:18:55 2016 +0200 |
committer | Alexandre Belloni <alexandre.belloni@free-electrons.com> | Sat Jun 04 15:46:08 2016 +0200 |
tree | 7c194e5a9a008ab147e7c926e81dfd0fca9d6dd8 | |
parent | 2b2f5ff00f63847d95adad6289bd8b05f5983dd5 [diff] |
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: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>