On Tuesday 08 April 2008, Zhao Yakui wrote: > Subject: ACPI: Allow to override the RTC alarm time > >From : Zhao Yakui <yakui.zhao@xxxxxxxxx> > > In current kernel when RTC alarm time is set and not fired, > it is impossible to set RTC alarm again. But it is more > reasonable that the RTC alarm time can be overrided. I'll disagree. The problem is that if some task is waiting for the alarm at the specified time, you've just trashed the alarm it was relying on. > --- linux-2.6.orig/drivers/rtc/rtc-sysfs.c > +++ linux-2.6/drivers/rtc/rtc-sysfs.c > @@ -163,8 +163,6 @@ rtc_sysfs_set_wakealarm(struct device *d The comment explains much of this ... and if this patch were deemed to be good, you should have changed that comment rather than making it a lie: /* Avoid accidentally clobbering active alarms; we can't * entirely prevent that here, without even the minimal * locking from the /dev/rtcN api. */ retval = rtc_read_alarm(rtc, &alm); > retval = rtc_read_alarm(rtc, &alm); > if (retval < 0) > return retval; > - if (alm.enabled) > - return -EBUSY; > > alm.enabled = 1; > } else { > > -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html