From patchwork Tue Feb 21 09:04:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 142261 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-pw0-f56.google.com (mail-pw0-f56.google.com [209.85.160.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 A801BB6FA9 for ; Tue, 21 Feb 2012 19:49:20 +1100 (EST) Received: by pbcum15 with SMTP id um15sf7766414pbc.11 for ; Tue, 21 Feb 2012 00:49:15 -0800 (PST) Received-SPF: pass (google.com: domain of rtc-linux+bncCObKqo_qFxCKtY36BBoENNQbjQ@googlegroups.com designates 10.68.243.208 as permitted sender) client-ip=10.68.243.208; Authentication-Results: mr.google.com; spf=pass (google.com: domain of rtc-linux+bncCObKqo_qFxCKtY36BBoENNQbjQ@googlegroups.com designates 10.68.243.208 as permitted sender) smtp.mail=rtc-linux+bncCObKqo_qFxCKtY36BBoENNQbjQ@googlegroups.com; dkim=pass header.i=rtc-linux+bncCObKqo_qFxCKtY36BBoENNQbjQ@googlegroups.com Received: from mr.google.com ([10.68.243.208]) by 10.68.243.208 with SMTP id xa16mr17978794pbc.5.1329814155392 (num_hops = 1); Tue, 21 Feb 2012 00:49:15 -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=mMRfJqjnj/W/x/vBghL5s2SedqV9u9M5Y+l/su7b7C68I7UJsgCLpSe+E+ctsq5cbx qqzjOvpuYyqxVcaQ+KyZIKb0t6iGBtywBTRj37h0aKPKXRt4kH0fafl0xP9wU+ShbZAh n1ulBLR5yKlLc0ZX1Tu6zW3NnOSI46OHrb2DI= Received: by 10.68.243.208 with SMTP id xa16mr4914611pbc.5.1329814154611; Tue, 21 Feb 2012 00:49:14 -0800 (PST) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.68.120.102 with SMTP id lb6ls23059150pbb.6.gmail; Tue, 21 Feb 2012 00:49:14 -0800 (PST) Received: by 10.68.135.231 with SMTP id pv7mr17326043pbb.8.1329814154271; Tue, 21 Feb 2012 00:49:14 -0800 (PST) Received: by 10.68.135.231 with SMTP id pv7mr17326042pbb.8.1329814154261; Tue, 21 Feb 2012 00:49:14 -0800 (PST) Received: from na3sys009aog109.obsmtp.com ([74.125.149.201]) by gmr-mx.google.com with SMTP id p7si29817883pbq.0.2012.02.21.00.48.57; Tue, 21 Feb 2012 00:49:14 -0800 (PST) Received-SPF: temperror (google.com: error in processing during lookup of hzhuang1@marvell.com: DNS timeout) client-ip=74.125.149.201; Received: from MSI-MTA.marvell.com ([65.219.4.132]) by na3sys009aob109.postini.com ([74.125.148.12]) with SMTP ID DSNKT0NaeYfbe7hHjg4lTPv0oHP937oEeBmj@postini.com; Tue, 21 Feb 2012 00:49:14 PST Received: from maili.marvell.com ([10.68.76.210]) by MSI-MTA.marvell.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 21 Feb 2012 00:48:16 -0800 Received: from localhost (unknown [10.38.164.65]) by maili.marvell.com (Postfix) with ESMTP id 3C0094E4BC; Tue, 21 Feb 2012 00:48:16 -0800 (PST) From: Haojian Zhuang To: robert.jarzmik@free.fr, a.zummo@towertech.it, arnd@arndb.de, plagnioj@jcrosoft.com, linux-arm-kernel@lists.infradead.org, rtc-linux@googlegroups.com, linux@arm.linux.org.uk Cc: Haojian Zhuang Subject: [rtc-linux] [PATCH 1/7] rtc: sa1100: remove periodic code Date: Tue, 21 Feb 2012 17:04:50 +0800 Message-Id: <1329815096-6200-2-git-send-email-haojian.zhuang@marvell.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1329815096-6200-1-git-send-email-haojian.zhuang@marvell.com> References: <1329815096-6200-1-git-send-email-haojian.zhuang@marvell.com> X-OriginalArrivalTime: 21 Feb 2012 08:48:16.0434 (UTC) FILETIME=[8D98C120:01CCF075] 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;