Merge branch 'parisc-4.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller...
[firefly-linux-kernel-4.4.55.git] / drivers / rtc / rtc-ds1307.c
index a705e6490808f277e21102bf208a5e77c1d35bb1..188006c55ce0708771709199b183aff93c16c3b1 100644 (file)
@@ -718,9 +718,9 @@ static int mcp794xx_set_alarm(struct device *dev, struct rtc_wkalrm *t)
        regs[3] = bin2bcd(t->time.tm_sec);
        regs[4] = bin2bcd(t->time.tm_min);
        regs[5] = bin2bcd(t->time.tm_hour);
-       regs[6] = bin2bcd(t->time.tm_wday) + 1;
+       regs[6] = bin2bcd(t->time.tm_wday + 1);
        regs[7] = bin2bcd(t->time.tm_mday);
-       regs[8] = bin2bcd(t->time.tm_mon) + 1;
+       regs[8] = bin2bcd(t->time.tm_mon + 1);
 
        /* Clear the alarm 0 interrupt flag. */
        regs[6] &= ~MCP794XX_BIT_ALMX_IF;