Skip to content
Commit 615bb29c authored by Mark Lord's avatar Mark Lord Committed by Linus Torvalds
Browse files

rtc: ignore msb when reading back mday from alarm



I have a system here that actively relies upon RTC wake alarms, and it
has been failing (again) for a few days when attempting to use the
/sys/class/rtc/rtc?/wakealarm interface.

The old (fixed by Linus) /proc/ interface still works, but I'd like to
get it using the new one.

This patch fixes rtc-cmos to ignore the two upper bits when reading the
BCD mday (day of month) register from CMOS.  Some systems (eg.  mine)
seem to have the top bit set to "1" for some reason.

The older /proc/ interface ignores the upper bits, and so we should too.

Signed-off-by: default avatarMark Lord <mlord@pobox.com>
Acked-by: default avatarDavid Brownell <david-b@pacbell.net>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent b4f55508
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment