summaryrefslogtreecommitdiffstats
path: root/crypto/crc32c_generic.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2018-09-04 16:51:29 +0200
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2018-11-07 17:13:55 +0100
commitfbb974ba693bbfb4e24a62181ef16d4e45febc37 (patch)
treeeb77bc1c8c37007494dfc63d8a5c88ad8ba04ab8 /crypto/crc32c_generic.c
parent651022382c7f8da46cb4872a545ee1da6d097d2a (diff)
downloadlinux-fbb974ba693bbfb4e24a62181ef16d4e45febc37.tar.gz
linux-fbb974ba693bbfb4e24a62181ef16d4e45febc37.tar.bz2
linux-fbb974ba693bbfb4e24a62181ef16d4e45febc37.zip
rtc: cmos: Do not export alarm rtc_ops when we do not support alarms
When there is no IRQ configured for the RTC, the rtc-cmos code does not support alarms, all alarm rtc_ops fail with -EIO / -EINVAL. The rtc-core expects a rtc driver which does not support rtc alarms to not have alarm ops at all. Otherwise the wakealarm sysfs attr will read as empty rather then returning an error, making it impossible for userspace to find out beforehand if alarms are supported. A system without an IRQ for the RTC before this patch: [root@localhost ~]# cat /sys/class/rtc/rtc0/wakealarm [root@localhost ~]# After this patch: [root@localhost ~]# cat /sys/class/rtc/rtc0/wakealarm cat: /sys/class/rtc/rtc0/wakealarm: No such file or directory [root@localhost ~]# This fixes gnome-session + systemd trying to use suspend-then-hibernate, which causes systemd to abort the suspend when writing the RTC alarm fails. BugLink: https://github.com/systemd/systemd/issues/9988 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'crypto/crc32c_generic.c')
0 files changed, 0 insertions, 0 deletions