forked from Minki/linux
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: Sangjung Woo <sangjung.woo@samsung.com> Signed-off-by: Myugnjoo Ham <myungjoo.ham@samsung.com> Reviewed-by: Jonghwa Lee <jonghwa3.lee@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
7707bda3ee
commit
1748cbf7f7
@ -240,9 +240,9 @@ static int max77686_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
|
|||||||
}
|
}
|
||||||
|
|
||||||
alrm->pending = 0;
|
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) {
|
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);
|
__func__, __LINE__, ret);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user