From patchwork Thu Feb 23 16:00:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 142649 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-yw0-f56.google.com (mail-yw0-f56.google.com [209.85.213.56]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 5FFACB6F62 for ; Fri, 24 Feb 2012 02:46:38 +1100 (EST) Received: by yhpp61 with SMTP id p61sf1148692yhp.11 for ; Thu, 23 Feb 2012 07:46:36 -0800 (PST) Received-SPF: pass (google.com: domain of rtc-linux+bncCObKqo_qFxDbvpn6BBoExcMTKQ@googlegroups.com designates 10.68.122.194 as permitted sender) client-ip=10.68.122.194; Authentication-Results: mr.google.com; spf=pass (google.com: domain of rtc-linux+bncCObKqo_qFxDbvpn6BBoExcMTKQ@googlegroups.com designates 10.68.122.194 as permitted sender) smtp.mail=rtc-linux+bncCObKqo_qFxDbvpn6BBoExcMTKQ@googlegroups.com; dkim=pass header.i=rtc-linux+bncCObKqo_qFxDbvpn6BBoExcMTKQ@googlegroups.com Received: from mr.google.com ([10.68.122.194]) by 10.68.122.194 with SMTP id lu2mr1640192pbb.7.1330011996360 (num_hops = 1); Thu, 23 Feb 2012 07:46:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; 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-originalarrivaltime :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:x-google-group-id:list-post :list-help:list-archive:sender:list-subscribe:list-unsubscribe :content-type; bh=0CawSXlmWFfNIdeGki4QHVUBxAzXlwz1sAtHshDpzxQ=; b=b2Ocfvok0Bu8jHjIgYRHIbbSxNEPgO7cvC/bwqwl3e4opmUu8xfpOCpVGCHyg+picP 6IQqK2SHl5tw5vw5NXsJ8r/JOphZqhJfP95kz73OyWJGxK0AcY6HTgEMoKruS11bkBHM xs+MK20BXZuIPwTJuUpuiIXK3c8bMF2JldbFE= Received: by 10.68.122.194 with SMTP id lu2mr449973pbb.7.1330011995325; Thu, 23 Feb 2012 07:46:35 -0800 (PST) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.68.33.161 with SMTP id s1ls5965665pbi.7.gmail; Thu, 23 Feb 2012 07:46:35 -0800 (PST) Received: by 10.68.136.40 with SMTP id px8mr1616064pbb.1.1330011995058; Thu, 23 Feb 2012 07:46:35 -0800 (PST) Received: by 10.68.136.40 with SMTP id px8mr1616063pbb.1.1330011995048; Thu, 23 Feb 2012 07:46:35 -0800 (PST) Received: from na3sys009aog116.obsmtp.com ([74.125.149.240]) by gmr-mx.google.com with SMTP id p7si2440265pbq.0.2012.02.23.07.46.21; Thu, 23 Feb 2012 07:46:35 -0800 (PST) Received-SPF: temperror (google.com: error in processing during lookup of hzhuang1@marvell.com: DNS timeout) client-ip=74.125.149.240; Received: from MSI-MTA.marvell.com ([65.219.4.132]) by na3sys009aob116.postini.com ([74.125.148.12]) with SMTP ID DSNKT0ZfTYvbYnUlJf/PNcQ8McZoE2qOehfW@postini.com; Thu, 23 Feb 2012 07:46:34 PST Received: from maili.marvell.com ([10.68.76.210]) by MSI-MTA.marvell.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 23 Feb 2012 07:43:37 -0800 Received: from localhost (unknown [10.38.164.65]) by maili.marvell.com (Postfix) with ESMTP id AE2F64E4BC; Thu, 23 Feb 2012 07:43:37 -0800 (PST) From: Haojian Zhuang To: a.zummo@towertech.it, arnd@arndb.de, rtc-linux@googlegroups.com, robert.jarzmik@free.fr, plagnioj@jcrosoft.com, linux-arm-kernel@lists.infradead.org, linux@arm.linux.org.uk Cc: Haojian Zhuang Subject: [rtc-linux] [PATCH v3 1/7] rtc: sa1100: remove periodic code Date: Fri, 24 Feb 2012 00:00:45 +0800 Message-Id: <1330012851-13693-2-git-send-email-haojian.zhuang@marvell.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1330012851-13693-1-git-send-email-haojian.zhuang@marvell.com> References: <1330012851-13693-1-git-send-email-haojian.zhuang@marvell.com> X-OriginalArrivalTime: 23 Feb 2012 15:43:37.0932 (UTC) FILETIME=[E8CB10C0:01CCF241] X-Original-Sender: haojian.zhuang@marvell.com X-Original-Authentication-Results: gmr-mx.google.com; spf=temperror (google.com: error in processing during lookup of hzhuang1@marvell.com: DNS timeout) smtp.mail=hzhuang1@marvell.com Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: X-Google-Group-Id: 712029733259 List-Post: , List-Help: , List-Archive: Sender: rtc-linux@googlegroups.com List-Subscribe: , List-Unsubscribe: , Since periodic timer is already supported by hrtimer in rtc interface, we needn't keep the duplicated code in rtc-sa1100.c any more. Signed-off-by: Haojian Zhuang --- drivers/rtc/rtc-sa1100.c | 15 --------------- 1 files changed, 0 insertions(+), 15 deletions(-) diff --git a/drivers/rtc/rtc-sa1100.c b/drivers/rtc/rtc-sa1100.c index cb9a585..fef52c8 100644 --- a/drivers/rtc/rtc-sa1100.c +++ b/drivers/rtc/rtc-sa1100.c @@ -42,19 +42,8 @@ #define RTC_DEF_TRIM 0 static const unsigned long RTC_FREQ = 1024; -static struct rtc_time rtc_alarm; static DEFINE_SPINLOCK(sa1100_rtc_lock); -static inline int rtc_periodic_alarm(struct rtc_time *tm) -{ - return (tm->tm_year == -1) || - ((unsigned)tm->tm_mon >= 12) || - ((unsigned)(tm->tm_mday - 1) >= 31) || - ((unsigned)tm->tm_hour > 23) || - ((unsigned)tm->tm_min > 59) || - ((unsigned)tm->tm_sec > 59); -} - /* * Calculate the next alarm time given the requested alarm time mask * and the current time. @@ -146,9 +135,6 @@ static irqreturn_t sa1100_rtc_interrupt(int irq, void *dev_id) rtc_update_irq(rtc, 1, events); - if (rtsr & RTSR_AL && rtc_periodic_alarm(&rtc_alarm)) - rtc_update_alarm(&rtc_alarm); - spin_unlock(&sa1100_rtc_lock); return IRQ_HANDLED; @@ -225,7 +211,6 @@ static int sa1100_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) { u32 rtsr; - memcpy(&alrm->time, &rtc_alarm, sizeof(struct rtc_time)); rtsr = RTSR; alrm->enabled = (rtsr & RTSR_ALE) ? 1 : 0; alrm->pending = (rtsr & RTSR_AL) ? 1 : 0;