diff options
| author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2026-04-22 17:26:49 +0200 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2026-04-27 21:57:09 +0200 |
| commit | e0d219010477fb19d23b60970b2c03fe5985717c (patch) | |
| tree | 6ff70bb0201337b664a2dc4ec02d6d90d6a9ef85 /scripts | |
| parent | 77dd14ab1b575328745644136ba758d394e10fbc (diff) | |
ACPI: TAD: RTC: Refine timer value computations and checks
Since rtc_tm_to_ktime() may overflow for large RTC time values and
full second granularity is sufficient in timer value computations
in acpi_tad_rtc_set_alarm() and acpi_tad_rtc_read_alarm(), use
rtc_tm_to_time64() instead of that function, which also allows the
computations to be simplified.
Moreover, U32_MAX is a special "timer disabled" value, so make
acpi_tad_rtc_set_alarm() reject it when attempting to program the
alarm timers.
Fixes: 7572dcabe38d ("ACPI: TAD: Add alarm support to the RTC class device interface")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://patch.msgid.link/3414608.aeNJFYEL58@rafael.j.wysocki
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
