From patchwork Wed Sep 8 01:55:13 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wan ZongShun X-Patchwork-Id: 64084 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-ww0-f56.google.com (mail-ww0-f56.google.com [74.125.82.56]) by ozlabs.org (Postfix) with ESMTP id 74CB2B6F07 for ; Wed, 8 Sep 2010 11:55:18 +1000 (EST) Received: by wwi14 with SMTP id 14sf3806197wwi.11 for ; Tue, 07 Sep 2010 18:55:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:received:x-beenthere:received:received:received :received:received-spf:received:mime-version:received:received :in-reply-to:references:date:message-id:subject:from:to:cc :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:list-post:list-help:list-archive :sender:list-subscribe:list-unsubscribe:content-type :content-transfer-encoding; bh=4neN/EAxGYT0j0o2ZzA3gTkNyAGhkStrUL5r1D9P5YQ=; b=yugYRl8ReWtYInLT5GyesU9wbJjFE7LXSuViZ0bJbXAIWGctuSTMe6RlCPK79OOext BzgpH8/7b47YlrEL8sR8KqVFlc7yVQRud3vJq25p/9GrCT+hXvr9oaikUlGyqyrS5bkL JgtlDxR4CqYkOOJYtuLOKoNllvl/dEOe7RcSc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-beenthere:received-spf:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe:content-type:content-transfer-encoding; b=eBoZkZAqx66KLuVF2q9RkWZ5z4CFkGU0OYsBqhPxFaEoeOvXFW6Z2VoeJOwB0NJ2jd 9G82dja+6EBRSpPw9S/59NCGSCZjQ2rgWGTHpx0LShgliQkvk/avzoITYow+3HLIl5uD DrCyxpzYuR/eARZYGaw7tmhP+qIwsyQbO1Zcw= Received: by 10.216.145.132 with SMTP id p4mr1025451wej.5.1283910916204; Tue, 07 Sep 2010 18:55:16 -0700 (PDT) X-BeenThere: rtc-linux@googlegroups.com Received: by 10.216.237.134 with SMTP id y6ls2389535weq.2.p; Tue, 07 Sep 2010 18:55:15 -0700 (PDT) Received: by 10.216.11.143 with SMTP id 15mr345653wex.3.1283910915356; Tue, 07 Sep 2010 18:55:15 -0700 (PDT) Received: by 10.216.11.143 with SMTP id 15mr345652wex.3.1283910915335; Tue, 07 Sep 2010 18:55:15 -0700 (PDT) Received: from mail-wy0-f171.google.com (mail-wy0-f171.google.com [74.125.82.171]) by gmr-mx.google.com with ESMTP id o46si2499011weq.2.2010.09.07.18.55.14; Tue, 07 Sep 2010 18:55:14 -0700 (PDT) Received-SPF: pass (google.com: domain of mcuos.com@gmail.com designates 74.125.82.171 as permitted sender) client-ip=74.125.82.171; Received: by wya21 with SMTP id 21so7511996wya.16 for ; Tue, 07 Sep 2010 18:55:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.227.42.4 with SMTP id q4mr382683wbe.156.1283910913905; Tue, 07 Sep 2010 18:55:13 -0700 (PDT) Received: by 10.227.5.203 with HTTP; Tue, 7 Sep 2010 18:55:13 -0700 (PDT) In-Reply-To: <4C86C9C2.20603@fluff.org> References: <1283837381-9575-1-git-send-email-kgene.kim@samsung.com> <1283837381-9575-5-git-send-email-kgene.kim@samsung.com> <4C86C9C2.20603@fluff.org> Date: Wed, 8 Sep 2010 09:55:13 +0800 Message-ID: Subject: [rtc-linux] Re: [PATCH 4/5] rtc: rtc-s3c: Fix on RTC initialization method From: Wan ZongShun To: Ben Dooks Cc: Kukjin Kim , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, rtc-linux@googlegroups.com, p_gortmaker@yahoo.com, a.zummo@towertech.it, Changhwan Youn X-Original-Sender: mcuos.com@gmail.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of mcuos.com@gmail.com designates 74.125.82.171 as permitted sender) smtp.mail=mcuos.com@gmail.com; dkim=pass (test mode) header.i=@gmail.com Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: Sender: rtc-linux@googlegroups.com List-Subscribe: , List-Unsubscribe: , 2010/9/8 Ben Dooks : > On 07/09/10 06:29, Kukjin Kim wrote: >> From: Changhwan Youn >> >> This patch changes RTC initialization method on probe() as >> per Wan ZongShun's suggestion. The 'rtc_valid_tm(tm)' can >> check whether RTC BCD is valid or not. >> Hi Kukjin, I think you misunderstood my meaning. You only need add the ''rtc_valid_tm' checking in s3c_rtc_gettime() function as following patch. --- drivers/rtc/rtc-s3c.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) static int s3c_rtc_settime(struct device *dev, struct rtc_time *tm) diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c index a0d3ec8..270842c 100644 --- a/drivers/rtc/rtc-s3c.c +++ b/drivers/rtc/rtc-s3c.c @@ -185,7 +185,7 @@ static int s3c_rtc_gettime(struct device *dev, struct rtc_time *rtc_tm) rtc_tm->tm_year += 100; rtc_tm->tm_mon -= 1; - return 0; + return rtc_valid_tm(rtc_tm); }