rtc: palmas: read correct register for getting alarm timer
Laxman Dewangan [Mon, 17 Jun 2013 15:22:41 +0000 (20:22 +0530)]
Fix register address for reading back alarm timer.

bug 1308789

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/239336
(cherry picked from commit 9c145e9c1bd1c404536f003dc1b70176340d1798)

Change-Id: Ifdeef951d02c6c7906acd70d54d614f36d644458
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/251623
Reviewed-by: Automatic_Commit_Validation_User

drivers/rtc/rtc-palmas.c

index b190d64..183860b 100644 (file)
@@ -196,7 +196,7 @@ static int palmas_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm)
        struct palmas *palmas = dev_get_drvdata(dev->parent);
        int ret;
 
-       ret = palmas_rtc_bulk_read(palmas, PALMAS_SECONDS_REG,
+       ret = palmas_rtc_bulk_read(palmas, PALMAS_ALARM_SECONDS_REG,
                alarm_data, NUM_TIME_REGS);
        if (ret < 0) {
                dev_err(dev, "rtc_read_alarm error %d\n", ret);