diff options
author | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2018-06-05 23:09:14 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-08-03 07:55:13 +0200 |
commit | fda8caa9cb0c80deab362d73a8fd2cd322ce20fc (patch) | |
tree | ebab191dbeeb4bd2c376afba2e15bd82b7e4c0e3 /tools | |
parent | c99dbd95723e7bd5616e0dbe4e829e26d4db7177 (diff) |
rtc: ensure rtc_set_alarm fails when alarms are not supported
[ Upstream commit abfdff44bc38e9e2ef7929f633fb8462632299d4 ]
When using RTC_ALM_SET or RTC_WKALM_SET with rtc_wkalrm.enabled not set,
rtc_timer_enqueue() is not called and rtc_set_alarm() may succeed but the
subsequent RTC_AIE_ON ioctl will fail. RTC_ALM_READ would also fail in that
case.
Ensure rtc_set_alarm() fails when alarms are not supported to avoid letting
programs think the alarms are working for a particular RTC when they are
not.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions