projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
45ef045
)
rtc: pcf8563: fix wrong time from read_alarm
author
Jan Kardell
<
[email protected]
>
Wed, 10 Dec 2014 23:53:37 +0000
(15:53 -0800)
committer
Linus Torvalds
<
[email protected]
>
Thu, 11 Dec 2014 01:41:15 +0000
(17:41 -0800)
Incorrect mask was used for hour and monthday fields.
Signed-off-by: Jan Kardell <
[email protected]
>
Cc: Alessandro Zummo <
[email protected]
>
Cc: Grant Likely <
[email protected]
>
Cc: Rob Herring <
[email protected]
>
Cc: Vincent Donnefort <
[email protected]
>
Cc: Dan Carpenter <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
drivers/rtc/rtc-pcf8563.c
patch
|
blob
|
history
diff --git
a/drivers/rtc/rtc-pcf8563.c
b/drivers/rtc/rtc-pcf8563.c
index 8c23606ce2ccfaa89a1cfde85a3f5c7a7241fa53..78f76d99bd355ef55e2771f47bcdd6db2b85fb31 100644
(file)
--- a/
drivers/rtc/rtc-pcf8563.c
+++ b/
drivers/rtc/rtc-pcf8563.c
@@
-336,8
+336,8
@@
static int pcf8563_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *tm)
__func__, buf[0], buf[1], buf[2], buf[3]);
tm->time.tm_min = bcd2bin(buf[0] & 0x7F);
- tm->time.tm_hour = bcd2bin(buf[1] & 0x
7
F);
- tm->time.tm_mday = bcd2bin(buf[2] & 0x
1
F);
+ tm->time.tm_hour = bcd2bin(buf[1] & 0x
3
F);
+ tm->time.tm_mday = bcd2bin(buf[2] & 0x
3
F);
tm->time.tm_wday = bcd2bin(buf[3] & 0x7);
tm->time.tm_mon = -1;
tm->time.tm_year = -1;