rtc: don't write RTC century when setting a wake alarm
PATCH 3/4 rtc: don't write RTC century when setting a wake alarm
From: Mark Lord <[email protected]>
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 <[email protected]>
Cc David Brownell <[email protected]>
Cc Len Brown <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
drivers/acpi/sleep/proc.c | 5 ----- 1 file changed, 5 deletions(-)
drivers/acpi/sleep/proc.c renamed from drivers/acpi/sleep/proc.c~rtc-dont-write-rtc-century-when-setting-a-wake-alarm +0 -5
@@ -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 *filcmos_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 );
_