public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Kukjin Kim <kgene.kim@samsung.com>
To: jhbird.choi@samsung.com, rtc-linux@googlegroups.com,
	linux-kernel@vger.kernel.org
Cc: "'Alessandro Zummo'" <a.zummo@towertech.it>, akpm@linux-foundation.org
Subject: RE: [PATCH] driver/rtc/rtc-s3c: Fix driver clock enable/disable balance issues
Date: Mon, 21 Nov 2011 19:50:41 +0900	[thread overview]
Message-ID: <03e901cca83b$69a48bf0$3ceda3d0$%kim@samsung.com> (raw)
In-Reply-To: <1320747253-9281-1-git-send-email-jhbird.choi@samsung.com>

jhbird.choi@samsung.com wrote:
> 
> From: Jonghwan Choi <jhbird.choi@samsung.com>
> 
> If an error occurs after clock is enabled, it can become unbalanced.
> 
> Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>

Cc: stable@kernel.org
Acked-by: Kukjin Kim <kgene.kim@samsung.com>

(Cc'ed Andrew Morton)

Hi Andrew,

If you're ok with this, could you please pick this up in your tree?

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

> ---
>  drivers/rtc/rtc-s3c.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
> index 7639ab9..5b979d9 100644
> --- a/drivers/rtc/rtc-s3c.c
> +++ b/drivers/rtc/rtc-s3c.c
> @@ -202,7 +202,6 @@ static int s3c_rtc_settime(struct device *dev, struct
rtc_time
> *tm)
>  	void __iomem *base = s3c_rtc_base;
>  	int year = tm->tm_year - 100;
> 
> -	clk_enable(rtc_clk);
>  	pr_debug("set time %04d.%02d.%02d %02d:%02d:%02d\n",
>  		 1900 + tm->tm_year, tm->tm_mon, tm->tm_mday,
>  		 tm->tm_hour, tm->tm_min, tm->tm_sec);
> @@ -214,6 +213,7 @@ static int s3c_rtc_settime(struct device *dev, struct
rtc_time
> *tm)
>  		return -EINVAL;
>  	}
> 
> +	clk_enable(rtc_clk);
>  	writeb(bin2bcd(tm->tm_sec),  base + S3C2410_RTCSEC);
>  	writeb(bin2bcd(tm->tm_min),  base + S3C2410_RTCMIN);
>  	writeb(bin2bcd(tm->tm_hour), base + S3C2410_RTCHOUR);
> --
> 1.7.1


      reply	other threads:[~2011-11-21 10:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-08 10:14 [PATCH] driver/rtc/rtc-s3c: Fix driver clock enable/disable balance issues jhbird.choi
2011-11-21 10:50 ` Kukjin Kim [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='03e901cca83b$69a48bf0$3ceda3d0$%kim@samsung.com' \
    --to=kgene.kim@samsung.com \
    --cc=a.zummo@towertech.it \
    --cc=akpm@linux-foundation.org \
    --cc=jhbird.choi@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rtc-linux@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox