All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 5/8] rtc: don't write RTC century when setting a wake alarm
@ 2007-12-13 23:53 akpm
  2008-01-07 20:02 ` Andrew Morton
  0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2007-12-13 23:53 UTC (permalink / raw)
  To: lenb; +Cc: linux-acpi, akpm, lkml, david-b, mlord

From: Mark Lord <lkml@rtr.ca>

Fix /proc/acpi/alarm to not overwrite the RTC century field when setting a
wake alarm.  The alarm hardware doesn't have a century field, and we really
should not be fiddling with the RTC century field here.

Signed-off-by: Mark Lord <mlord@pobox.com>
Cc: David Brownell <david-b@pacbell.net>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/acpi/sleep/proc.c |    5 -----
 1 file changed, 5 deletions(-)

diff -puN drivers/acpi/sleep/proc.c~rtc-dont-write-rtc-century-when-setting-a-wake-alarm drivers/acpi/sleep/proc.c
--- a/drivers/acpi/sleep/proc.c~rtc-dont-write-rtc-century-when-setting-a-wake-alarm
+++ a/drivers/acpi/sleep/proc.c
@@ -268,7 +268,6 @@ acpi_system_write_alarm(struct file *fil
 		day -= 31;
 	}
 	if (mo > 12) {
-		yr += 1;
 		mo -= 12;
 	}
 
@@ -277,7 +276,6 @@ acpi_system_write_alarm(struct file *fil
 	rtc_control = CMOS_READ(RTC_CONTROL);
 
 	if (adjust) {
-		yr += cmos_bcd_read(RTC_YEAR, rtc_control);
 		mo += cmos_bcd_read(RTC_MONTH, rtc_control);
 		day += cmos_bcd_read(RTC_DAY_OF_MONTH, rtc_control);
 		hr += cmos_bcd_read(RTC_HOURS, rtc_control);
@@ -304,7 +302,6 @@ acpi_system_write_alarm(struct file *fil
 		day -= 31;
 	}
 	if (mo > 12) {
-		yr++;
 		mo -= 12;
 	}
 
@@ -331,8 +328,6 @@ acpi_system_write_alarm(struct file *fil
 		cmos_bcd_write(day, acpi_gbl_FADT.day_alarm, rtc_control);
 	if (acpi_gbl_FADT.month_alarm)
 		cmos_bcd_write(mo, acpi_gbl_FADT.month_alarm, rtc_control);
-	if (acpi_gbl_FADT.century)
-		cmos_bcd_write(yr / 100, acpi_gbl_FADT.century, rtc_control);
 	/* enable the rtc alarm interrupt */
 	rtc_control |= RTC_AIE;
 	CMOS_WRITE(rtc_control, RTC_CONTROL);
_

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch 5/8] rtc: don't write RTC century when setting a wake alarm
  2007-12-13 23:53 [patch 5/8] rtc: don't write RTC century when setting a wake alarm akpm
@ 2008-01-07 20:02 ` Andrew Morton
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2008-01-07 20:02 UTC (permalink / raw)
  To: lenb, linux-acpi, lkml, david-b, mlord

On Thu, 13 Dec 2007 15:53:38 -0800
akpm@linux-foundation.org wrote:

> From: Mark Lord <lkml@rtr.ca>
> 
> Fix /proc/acpi/alarm to not overwrite the RTC century field when setting a
> wake alarm.  The alarm hardware doesn't have a century field, and we really
> should not be fiddling with the RTC century field here.

So this bugfix was summarily ignored without comment and a different one
was merged which caused this patch to get 100% rejects.  Great stuff.

I'll drop this one.  Mark, could you please redo and retest and we'll have
another go.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-01-07 20:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-13 23:53 [patch 5/8] rtc: don't write RTC century when setting a wake alarm akpm
2008-01-07 20:02 ` Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.