Commit 1748cbf7 authored by Sangjung Woo's avatar Sangjung Woo Committed by Linus Torvalds

drivers/rtc/rtc-max77686.c: Fix wrong register

Fix a read of the wrong register when checking whether the RTC timer has
reached the alarm time.
Signed-off-by: default avatarSangjung Woo <sangjung.woo@samsung.com>
Signed-off-by: default avatarMyugnjoo Ham <myungjoo.ham@samsung.com>
Reviewed-by: default avatarJonghwa Lee <jonghwa3.lee@samsung.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 7707bda3
......@@ -240,9 +240,9 @@ static int max77686_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
}
alrm->pending = 0;
ret = regmap_read(info->max77686->regmap, MAX77686_REG_STATUS1, &val);
ret = regmap_read(info->max77686->regmap, MAX77686_REG_STATUS2, &val);
if (ret < 0) {
dev_err(info->dev, "%s:%d fail to read status1 reg(%d)\n",
dev_err(info->dev, "%s:%d fail to read status2 reg(%d)\n",
__func__, __LINE__, ret);
goto out;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment