rtc: fix alarm read and set offset
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Thu, 12 Jul 2018 10:22:44 +0000 (12:22 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Fri, 13 Jul 2018 08:37:54 +0000 (10:37 +0200)
commitfd6792bb022e43faa0c4a45b6f25285e21206f9d
treea4f98ad7c770d6317e749fed29d5acad1b0a3ff0
parentca95ef7c98674a8eb5d411fc0835783051c0662b
rtc: fix alarm read and set offset

The offset needs to be added after reading the alarm value.

It also needs to be subtracted after the now < alarm test.

Tested-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/interface.c