rtc: allow rtc_read_alarm without read_alarm callback
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Tue, 14 Feb 2023 22:27:53 +0000 (23:27 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 11 Mar 2023 12:57:31 +0000 (13:57 +0100)
commit746d4e369e041c3dfbe97c75cbbd37fa407ab1a6
tree20d71ac47a47330af11c5d3ac1e34a2498641b70
parent6e47bb21b63b5825102153b0596b537a609653d2
rtc: allow rtc_read_alarm without read_alarm callback

[ Upstream commit a783c962619271a8b905efad1d89adfec11ae0c8 ]

.read_alarm is not necessary to read the current alarm because it is
recorded in the aie_timer and so rtc_read_alarm() will never call
rtc_read_alarm_internal() which is the only function calling the callback.

Reported-by: Zhipeng Wang <zhipeng.wang_1@nxp.com>
Reported-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Fixes: 7ae41220ef58 ("rtc: introduce features bitfield")
Tested-by: Philippe Schenker <philippe.schenker@toradex.com>
Link: https://lore.kernel.org/r/20230214222754.582582-1-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/rtc/interface.c