]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
rtc: ignore msb when reading back mday from alarm
authorMark Lord <lkml@rtr.ca>
Sun, 4 Nov 2007 02:04:03 +0000 (22:04 -0400)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sun, 4 Nov 2007 21:13:09 +0000 (13:13 -0800)
commit615bb29ccbe9fa06d9f33b29d9c3f51340726656
tree705059547b9564e8c57afb1645db04bc4b7e556c
parentb4f555081fdd27d13e6ff39d455d5aefae9d2c0c
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: Mark Lord <mlord@pobox.com>
Acked-by: David Brownell <david-b@pacbell.net>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/rtc/rtc-cmos.c