aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/firmware.h
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2008-07-04 09:59:26 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-04 10:40:04 -0700
commita01cc6570326c01e70619bf6540fb32139947c33 (patch)
tree810c96598eebc23ca7e53a25b857a9143a17d7d6 /include/linux/firmware.h
parentmm: dirty page accounting vs VM_MIXEDMAP (diff)
downloadlinux-dev-a01cc6570326c01e70619bf6540fb32139947c33.tar.xz
linux-dev-a01cc6570326c01e70619bf6540fb32139947c33.zip
rtc: rtc_read_alarm() handles wraparound
While 0e36a9a4a788e4e92407774df76c545910810d35 ("rtc: fix readback from /sys/class/rtc/rtc?/wakealarm") made sure that active alarms were never returned with invalid "wildcard" fields (negative), it can still report (wrongly) that the alarm triggers in the past. Example, if it's now 10am, an alarm firing at 5am will be triggered TOMORROW not today. (Which may also be next month or next year...) This updates that alarm handling in three ways: * Handle alarm rollover in the common cases of RTCs that don't support matching on all date fields. * Skip the invalid-field logic when it's not needed. * Minor bugfix ... tm_isdst should be ignored, it's one of the fields Linux doesn't maintain. A warning is emitted for some of the unhandled rollover cases, but the possible combinations are a bit too numerous to handle every bit of potential hardware and firmware braindamage. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Mark Lord <lkml@rtr.ca> Acked-by: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/firmware.h')
0 files changed, 0 insertions, 0 deletions