diff options
author | Benoît Thébaudeau <benoit@wsystem.com> | 2016-07-21 12:41:29 +0200 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2016-07-28 09:59:37 +0200 |
commit | a1e98e09704ad247bff3c0de1bef6a73dc88b6d0 (patch) | |
tree | 48f18d457aeffe90c1332d9d0592151b7b51b2b6 /crypto/rsaprivkey.asn1 | |
parent | 96acb25c50e77355673b89765b96bd764abf487d (diff) | |
download | lwn-a1e98e09704ad247bff3c0de1bef6a73dc88b6d0.tar.gz lwn-a1e98e09704ad247bff3c0de1bef6a73dc88b6d0.zip |
rtc: rv8803: Fix read day of week
The Weekday register is encoded as 2^tm_wday, with tm_wday in 0..6, so
using tm_wday = ffs(reg) to fill tm_wday from the register value is
wrong because this gives the expected value + 1. This could be fixed as
tm_wday = ffs(reg) - 1, but tm_wday = ilog2(reg) works as well and is
more direct.
Signed-off-by: Benoît Thébaudeau <benoit@wsystem.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Diffstat (limited to 'crypto/rsaprivkey.asn1')
0 files changed, 0 insertions, 0 deletions