From patchwork Tue Sep 7 05:29:38 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kukjin Kim X-Patchwork-Id: 63969 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-fx0-f56.google.com (mail-fx0-f56.google.com [209.85.161.56]) by ozlabs.org (Postfix) with ESMTP id F088CB6EFE for ; Tue, 7 Sep 2010 15:46:50 +1000 (EST) Received: by fxm6 with SMTP id 6sf1388744fxm.11 for ; Mon, 06 Sep 2010 22:46:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:received:mime-version:x-beenthere:received :received:received:received:received-spf:received:received:from:to :cc:subject:date:message-id:x-mailer:in-reply-to:references :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; bh=dUkJkZdC1okgkexopaFGjMDB/ZbnoCDzZhbmu8ZY6KA=; b=wswdMmqR+xBIoYU4z7I1dvNVSXeVqZbS4NETIV6T1IOFPuQf3oNrcKa+/n3eld3l3A QCEee7yOLgPX9mQISSpDOQ7v4yela2x1L0xYfLyv7kWLMzQCkqrJP6ey+/DRqL+tSYzW LjihdlThJ08US7rghTtxluoBVQ6hVp6X1cUjc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=mime-version:x-beenthere:received-spf:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references: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; b=CiC4m/xBVzDrGOEIIkc3lPEMwJhogpRsnbqtMM7Z9lTL0YaoYMZsSNRWn4w0342QJc T2im7z1KagWJC7Y575i6sAhjsZ95wBpyz9h56pexHfGywIR5AdxKapIPEBOthl6ExJWf getSijMOcDGGDIsfT8ufKLfLJ6DRolKF9AR0A= Received: by 10.223.94.133 with SMTP id z5mr130776fam.23.1283838408280; Mon, 06 Sep 2010 22:46:48 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.223.59.212 with SMTP id m20ls1101853fah.3.p; Mon, 06 Sep 2010 22:46:47 -0700 (PDT) Received: by 10.223.121.20 with SMTP id f20mr37659far.2.1283838407758; Mon, 06 Sep 2010 22:46:47 -0700 (PDT) Received: by 10.223.121.20 with SMTP id f20mr37658far.2.1283838407720; Mon, 06 Sep 2010 22:46:47 -0700 (PDT) Received: from ganesha.gnumonks.org (ganesha.gnumonks.org [213.95.27.120]) by gmr-mx.google.com with ESMTP id r21si1700038fam.4.2010.09.06.22.46.47; Mon, 06 Sep 2010 22:46:47 -0700 (PDT) Received-SPF: neutral (google.com: 213.95.27.120 is neither permitted nor denied by best guess record for domain of kgene.kim@samsung.com) client-ip=213.95.27.120; Received: from uucp by ganesha.gnumonks.org with local-bsmtp (Exim 4.69) (envelope-from ) id 1Osr10-0005vE-IN; Tue, 07 Sep 2010 07:46:42 +0200 Received: from [12.23.102.184] (helo=localhost.localdomain) by jackpot.kr.gnumonks.org with esmtp (Exim 4.69) (envelope-from ) id 1Osq4z-0004LV-Nh; Tue, 07 Sep 2010 13:46:45 +0900 From: Kukjin Kim To: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, rtc-linux@googlegroups.com Cc: ben-linux@fluff.org, p_gortmaker@yahoo.com, a.zummo@towertech.it, Changhwan Youn , Kukjin Kim Subject: [rtc-linux] [PATCH 2/5] rtc: rtc-s3c: Fix setting missing field of getalarm Date: Tue, 7 Sep 2010 14:29:38 +0900 Message-Id: <1283837381-9575-3-git-send-email-kgene.kim@samsung.com> X-Mailer: git-send-email 1.6.2.5 In-Reply-To: <1283837381-9575-1-git-send-email-kgene.kim@samsung.com> References: <1283837381-9575-1-git-send-email-kgene.kim@samsung.com> X-Original-Sender: kgene.kim@samsung.com X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 213.95.27.120 is neither permitted nor denied by best guess record for domain of kgene.kim@samsung.com) smtp.mail=kgene.kim@samsung.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: , From: Changhwan Youn Current s3c_rtc_getalarm() sets missing field of alarm time with 0xff. But this value should be -1 according to drivers/rtc/interface.c. Signed-off-by: Changhwan Youn Signed-off-by: Kukjin Kim Cc: Ben Dooks Acked-By: Ben Dooks --- drivers/rtc/rtc-s3c.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c index 557a538..e9eb0a0 100644 --- a/drivers/rtc/rtc-s3c.c +++ b/drivers/rtc/rtc-s3c.c @@ -242,34 +242,34 @@ static int s3c_rtc_getalarm(struct device *dev, struct rtc_wkalrm *alrm) if (alm_en & S3C2410_RTCALM_SECEN) alm_tm->tm_sec = bcd2bin(alm_tm->tm_sec); else - alm_tm->tm_sec = 0xff; + alm_tm->tm_sec = -1; if (alm_en & S3C2410_RTCALM_MINEN) alm_tm->tm_min = bcd2bin(alm_tm->tm_min); else - alm_tm->tm_min = 0xff; + alm_tm->tm_min = -1; if (alm_en & S3C2410_RTCALM_HOUREN) alm_tm->tm_hour = bcd2bin(alm_tm->tm_hour); else - alm_tm->tm_hour = 0xff; + alm_tm->tm_hour = -1; if (alm_en & S3C2410_RTCALM_DAYEN) alm_tm->tm_mday = bcd2bin(alm_tm->tm_mday); else - alm_tm->tm_mday = 0xff; + alm_tm->tm_mday = -1; if (alm_en & S3C2410_RTCALM_MONEN) { alm_tm->tm_mon = bcd2bin(alm_tm->tm_mon); alm_tm->tm_mon -= 1; } else { - alm_tm->tm_mon = 0xff; + alm_tm->tm_mon = -1; } if (alm_en & S3C2410_RTCALM_YEAREN) alm_tm->tm_year = bcd2bin(alm_tm->tm_year); else - alm_tm->tm_year = 0xffff; + alm_tm->tm_year = -1; return 0; }