rtc: hym8563: in .read_alarm set .tm_sec to 0 to signal minute accuracy
authorUwe Kleine-König <uwe@kleine-koenig.org>
Mon, 11 Jul 2016 08:05:28 +0000 (10:05 +0200)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Tue, 19 Jul 2016 16:18:06 +0000 (18:18 +0200)
Set .tm_sec to 0 instead of -1 to signal minute accuracy.

Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
drivers/rtc/rtc-hym8563.c

index 795a3f5..e5ad527 100644 (file)
@@ -198,7 +198,7 @@ static int hym8563_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm)
                return ret;
 
        /* The alarm only has a minute accuracy */
-       alm_tm->tm_sec = -1;
+       alm_tm->tm_sec = 0;
 
        alm_tm->tm_min = (buf[0] & HYM8563_ALM_BIT_DISABLE) ?
                                        -1 :