From patchwork Thu Oct 7 23:41:15 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kukjin Kim X-Patchwork-Id: 67116 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 E37E5B70D2 for ; Fri, 8 Oct 2010 10:50:00 +1100 (EST) Received: by fxm1 with SMTP id 1sf100481fxm.11 for ; Thu, 07 Oct 2010 16:49:59 -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=UxHHLx0YwtQ6x+pvE3+ir2cPkEFFHd1qhCSg4JbKrWg=; b=hsiAdk3NhDFUwSqDawq0q6Dr1wVbof2TlQrDOnQChqX/TYfoUhvR3I5nTMOkN1kLx6 +VZthTENoQIjeyxcEUrMyuLBZRHjyxLuNvuXuuxI5nZzjqaH6xvi3Go53I7GlMvywdLr rctcMGfzwP0Qh8BAgkxjoLkQoE7z0A1YC3/Ag= 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=Dr6YRZZLg90IRqtK1vSCS4B2AJtTbYiK/rtwWu27ruhnK2pyu58QgltecPYvX2vlo7 f74F7X+lkGgWWa9SHozZScUW46bEq84gthxibbcsXe4CRs7Uw5xUXHpDNtpKuQjGCg/t GthS4VbrCQRDNxmuJUnuNrDABz++pGF5rUV8s= Received: by 10.223.68.9 with SMTP id t9mr63378fai.34.1286495397934; Thu, 07 Oct 2010 16:49:57 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.223.59.212 with SMTP id m20ls230204fah.3.p; Thu, 07 Oct 2010 16:49:57 -0700 (PDT) Received: by 10.223.105.131 with SMTP id t3mr63551fao.14.1286495397247; Thu, 07 Oct 2010 16:49:57 -0700 (PDT) Received: by 10.223.105.131 with SMTP id t3mr63550fao.14.1286495397224; Thu, 07 Oct 2010 16:49:57 -0700 (PDT) Received: from ganesha.gnumonks.org (ganesha.gnumonks.org [213.95.27.120]) by gmr-mx.google.com with ESMTP id y11si737146faj.2.2010.10.07.16.49.56; Thu, 07 Oct 2010 16:49:56 -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 1P40Dh-0004NF-33; Fri, 08 Oct 2010 01:49:53 +0200 Received: from [12.23.102.184] (helo=localhost.localdomain) by jackpot.kr.gnumonks.org with esmtp (Exim 4.69) (envelope-from ) id 1P3zU0-0003Ip-CI; Fri, 08 Oct 2010 08:02:40 +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, akpm@linux-foundation.org, Changhwan Youn , Kukjin Kim Subject: [rtc-linux] [PATCH 2/6] rtc: rtc-s3c: Fix setting missing field of getalarm Date: Fri, 8 Oct 2010 08:41:15 +0900 Message-Id: <1286494879-2932-3-git-send-email-kgene.kim@samsung.com> X-Mailer: git-send-email 1.6.2.5 In-Reply-To: <1286494879-2932-1-git-send-email-kgene.kim@samsung.com> References: <1286494879-2932-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 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 4a0b875..fd08876 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; }