rtc: mcp795: use bcd2bin/bin2bcd.
authorEmil Bartczak <emilbart@gmail.com>
Wed, 7 Dec 2016 23:27:37 +0000 (00:27 +0100)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Sun, 18 Dec 2016 23:59:22 +0000 (00:59 +0100)
commitbcf18d88ac16c1a86bac7e8f5f4b1de1f752865f
tree682300c7954114742262a5d310737f74a847a8b4
parent0b6a8f5c9bebe51b95ff23939db570e8d298a36f
rtc: mcp795: use bcd2bin/bin2bcd.

Change rtc-mcp795.c to use the bcd2bin/bin2bcd functions.
This change fixes the wrong conversion of month value
from binary to BCD (missing right shift operation for 10 month).

Signed-off-by: Emil Bartczak <emilbart@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
drivers/rtc/rtc-mcp795.c