public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers/rtc/rtc-max77686.c: Fix wrong register
@ 2013-08-13 13:37 Sangjung Woo
  2013-08-13 14:33 ` jonghwa3.lee
  0 siblings, 1 reply; 4+ messages in thread
From: Sangjung Woo @ 2013-08-13 13:37 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Sangjung Woo, Jonghwa Lee, linux-kernel, Myugnjoo Ham

Fix to read the wrong register when cheching whether the RTC timer has
reached or not.

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>
---
 drivers/rtc/rtc-max77686.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-max77686.c b/drivers/rtc/rtc-max77686.c
index 9915cb9..a1140c8 100644
--- a/drivers/rtc/rtc-max77686.c
+++ b/drivers/rtc/rtc-max77686.c
@@ -240,7 +240,7 @@ 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",
 				__func__, __LINE__, ret);
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] drivers/rtc/rtc-max77686.c: Fix wrong register
  2013-08-13 13:37 [PATCH] drivers/rtc/rtc-max77686.c: Fix wrong register Sangjung Woo
@ 2013-08-13 14:33 ` jonghwa3.lee
  0 siblings, 0 replies; 4+ messages in thread
From: jonghwa3.lee @ 2013-08-13 14:33 UTC (permalink / raw)
  To: Sangjung Woo; +Cc: Andrew Morton, Jonghwa Lee, linux-kernel, Myugnjoo Ham

On 2013년 08월 13일 22:37, Sangjung Woo wrote:

> Fix to read the wrong register when cheching whether the RTC timer has
> reached or not.
> 
> 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>
> ---
>  drivers/rtc/rtc-max77686.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/rtc/rtc-max77686.c b/drivers/rtc/rtc-max77686.c
> index 9915cb9..a1140c8 100644
> --- a/drivers/rtc/rtc-max77686.c
> +++ b/drivers/rtc/rtc-max77686.c
> @@ -240,7 +240,7 @@ 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",


Would you change the error message either?

>  				__func__, __LINE__, ret);

Thanks,
Jonghwa.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] drivers/rtc/rtc-max77686.c: Fix wrong register
@ 2013-08-14  1:21 Sangjung Woo
  2013-08-14 20:21 ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Sangjung Woo @ 2013-08-14  1:21 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Sangjung Woo, Jonghwa Lee, linux-kernel, Myugnjoo Ham

Fix to read the wrong register when checking whether the RTC timer has
reached or not.

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>
---
 drivers/rtc/rtc-max77686.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/rtc/rtc-max77686.c b/drivers/rtc/rtc-max77686.c
index 9915cb9..9efe118 100644
--- a/drivers/rtc/rtc-max77686.c
+++ b/drivers/rtc/rtc-max77686.c
@@ -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;
 	}
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] drivers/rtc/rtc-max77686.c: Fix wrong register
  2013-08-14  1:21 Sangjung Woo
@ 2013-08-14 20:21 ` Andrew Morton
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Morton @ 2013-08-14 20:21 UTC (permalink / raw)
  To: Sangjung Woo; +Cc: Jonghwa Lee, linux-kernel, Myugnjoo Ham

On Wed, 14 Aug 2013 10:21:41 +0900 Sangjung Woo <sangjung.woo@samsung.com> wrote:

> Fix to read the wrong register when checking whether the RTC timer has
> reached or not.
> 
> ...
>
> --- a/drivers/rtc/rtc-max77686.c
> +++ b/drivers/rtc/rtc-max77686.c
> @@ -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;
>  	}

The changelog didn't describe the end-user visible effects of the bug,
so I am unable to determine which kernel version(s) need patching. 
Please always include this information.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-08-14 20:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-13 13:37 [PATCH] drivers/rtc/rtc-max77686.c: Fix wrong register Sangjung Woo
2013-08-13 14:33 ` jonghwa3.lee
  -- strict thread matches above, loose matches on Subject: below --
2013-08-14  1:21 Sangjung Woo
2013-08-14 20:21 ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox