/proc/acpi/alarm: handle day-of-month wraparound on readback
authorMark Lord <lkml@rtr.ca>
Tue, 9 Dec 2008 15:46:30 +0000 (10:46 -0500)
committerLen Brown <len.brown@intel.com>
Wed, 10 Dec 2008 05:29:35 +0000 (00:29 -0500)
commit48452e5f99ab35d643df0463b6ad11aea8ea7bdc
tree9d5418951b0064f231d1df81f96b1ba624e46f99
parent437f2f91d6597c67662f847d9ed4c99cb3c440cd
/proc/acpi/alarm: handle day-of-month wraparound on readback

Fix month wrap issue with readback from /proc/acpi/alarm
This bug has been around *forever*.

  $ echo '2008-12-01 10:36:20' > /proc/acpi/alarm
  $ cat /proc/acpi/alarm
  2008-11-01 10:36:20

Note how the readback above shows the month incorrectly
when the alarm is set in the *next* calendar month.
But with this patch applied, it shows the correct month (12).

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/sleep/proc.c