From patchwork Thu Jan 15 23:46:49 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: dann frazier X-Patchwork-Id: 18879 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from mail-gx0-f56.google.com (mail-gx0-f56.google.com [209.85.217.56]) by ozlabs.org (Postfix) with ESMTP id 06275DE359 for ; Fri, 16 Jan 2009 10:47:07 +1100 (EST) Received: by gxk16 with SMTP id 16so1630654gxk.1 for ; Thu, 15 Jan 2009 15:47:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:received:received:x-sender:x-apparently-to :received:received:received-spf:authentication-results:received :received:received:x-virus-scanned:received:received:received:from :to:cc:subject:date:message-id:x-mailer:in-reply-to:references :in-reply-to:references:reply-to:sender:precedence:x-google-loop :mailing-list:list-id:list-post:list-help:list-unsubscribe :x-beenthere-env:x-beenthere; bh=8jzbsv8h9ZVUlzNs4WNtIhie/0oUyj2DpSCTzRufW5k=; b=x+QUtzzFPFKes+hLqVVmCbhcwBBEesjN/RiWNIJvWJsMcf9a5Vu+EdX4I9SYawacs8 Q3O142wZV2oKVNuD44EkpwL1ysFYyGc9AYxe7XoaHSi9QngcPFPd8vIP/mBMoHWjkTAA K1ap+zi7roE71/T3qByJapVdKWN4j1PPjCyJ4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-sender:x-apparently-to:received-spf:authentication-results :x-virus-scanned:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:reply-to:sender:precedence:x-google-loop :mailing-list:list-id:list-post:list-help:list-unsubscribe :x-beenthere-env:x-beenthere; b=a224i7yrtAoS+bY0Ih73/XqRMncXVO7aGdr76IFE58OS8dyVwwVQ6bJgsajy7eE2vI syWMML67VzjqQZk/zJToxkuYibp2nnPW1k3NppjOlLBn7W/0fjXIDVjUsnAhDTLEaa4o CR712uqF+wUIXlcaA/KdRC3jhYV+po3IREGmI= Received: by 10.150.154.5 with SMTP id b5mr363066ybe.14.1232063223441; Thu, 15 Jan 2009 15:47:03 -0800 (PST) Received: by 10.176.101.40 with SMTP id y40gr1808yqb.0; Thu, 15 Jan 2009 15:47:03 -0800 (PST) X-Sender: dannf@ldl.fc.hp.com X-Apparently-To: rtc-linux@googlegroups.com Received: by 10.90.79.17 with SMTP id c17mr1258596agb.9.1232063223093; Thu, 15 Jan 2009 15:47:03 -0800 (PST) Received: from g1t0026.austin.hp.com (g1t0026.austin.hp.com [15.216.28.33]) by mx.google.com with ESMTP id 39si192316yxd.12.2009.01.15.15.47.02; Thu, 15 Jan 2009 15:47:03 -0800 (PST) Received-SPF: pass (google.com: domain of dannf@ldl.fc.hp.com designates 15.216.28.33 as permitted sender) client-ip=15.216.28.33; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dannf@ldl.fc.hp.com designates 15.216.28.33 as permitted sender) smtp.mail=dannf@ldl.fc.hp.com Received: from g5t0030.atlanta.hp.com (g5t0030.atlanta.hp.com [16.228.8.142]) by g1t0026.austin.hp.com (Postfix) with ESMTP id AA1C0C368; Thu, 15 Jan 2009 23:47:02 +0000 (UTC) Received: from ldl.fc.hp.com (ldl.fc.hp.com [15.11.146.30]) by g5t0030.atlanta.hp.com (Postfix) with ESMTP id 263D624029; Thu, 15 Jan 2009 23:47:02 +0000 (UTC) Received: from localhost (ldl.fc.hp.com [127.0.0.1]) by ldl.fc.hp.com (Postfix) with ESMTP id 8AB3839C00B; Thu, 15 Jan 2009 16:47:01 -0700 (MST) X-Virus-Scanned: Debian amavisd-new at ldl.fc.hp.com Received: from ldl.fc.hp.com ([127.0.0.1]) by localhost (ldl.fc.hp.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sJCwcchOJNEl; Thu, 15 Jan 2009 16:47:00 -0700 (MST) Received: from krebs (krebs.dannf [10.8.0.7]) by ldl.fc.hp.com (Postfix) with ESMTP id 70AC339C017; Thu, 15 Jan 2009 16:46:58 -0700 (MST) Received: by krebs (Postfix, from userid 20800) id C20793B6923; Thu, 15 Jan 2009 16:46:57 -0700 (MST) From: dann frazier To: linux-parisc@vger.kernel.org, rtc-linux@googlegroups.com Cc: lkml@vger.kernel.org, kyle@mcmartin.ca, dann frazier Subject: [rtc-linux] [PATCH 2/9] Remove redundant locking Date: Thu, 15 Jan 2009 16:46:49 -0700 Message-Id: <0c29db565874aae3a60172ad42635fb8f60e8369.1231983599.git.dannf@hp.com> X-Mailer: git-send-email 1.5.6.5 In-Reply-To: <5bda6a81bf9fa4a3b60253bca73ef629a6ccc629.1231983599.git.dannf@hp.com> References: <5bda6a81bf9fa4a3b60253bca73ef629a6ccc629.1231983599.git.dannf@hp.com> In-Reply-To: References: Reply-To: rtc-linux@googlegroups.com Sender: rtc-linux@googlegroups.com Precedence: bulk X-Google-Loop: groups Mailing-List: list rtc-linux@googlegroups.com; contact rtc-linux+owner@googlegroups.com List-Id: List-Post: List-Help: List-Unsubscribe: , X-BeenThere-Env: rtc-linux@googlegroups.com X-BeenThere: rtc-linux@googlegroups.com The RTC subsystem proides ops locking, no need to implement our own Signed-off-by: dann frazier --- drivers/rtc/rtc-parisc.c | 12 +----------- 1 files changed, 1 insertions(+), 11 deletions(-) diff --git a/drivers/rtc/rtc-parisc.c b/drivers/rtc/rtc-parisc.c index 319bb5d..cb087ad 100644 --- a/drivers/rtc/rtc-parisc.c +++ b/drivers/rtc/rtc-parisc.c @@ -14,17 +14,13 @@ /* as simple as can be, and no simpler. */ struct parisc_rtc { struct rtc_device *rtc; - spinlock_t lock; }; static int parisc_get_time(struct device *dev, struct rtc_time *tm) { - struct parisc_rtc *p = dev_get_drvdata(dev); - unsigned long flags, ret; + unsigned long ret; - spin_lock_irqsave(&p->lock, flags); ret = get_rtc_time(tm); - spin_unlock_irqrestore(&p->lock, flags); if (ret & RTC_BATT_BAD) return -EOPNOTSUPP; @@ -34,13 +30,9 @@ static int parisc_get_time(struct device *dev, struct rtc_time *tm) static int parisc_set_time(struct device *dev, struct rtc_time *tm) { - struct parisc_rtc *p = dev_get_drvdata(dev); - unsigned long flags; int ret; - spin_lock_irqsave(&p->lock, flags); ret = set_rtc_time(tm); - spin_unlock_irqrestore(&p->lock, flags); if (ret < 0) return -EOPNOTSUPP; @@ -61,8 +53,6 @@ static int __devinit parisc_rtc_probe(struct platform_device *dev) if (!p) return -ENOMEM; - spin_lock_init(&p->lock); - p->rtc = rtc_device_register("rtc-parisc", &dev->dev, &parisc_rtc_ops, THIS_MODULE); if (IS_ERR(p->rtc)) {