From patchwork Fri Nov 21 14:12:06 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Atsushi Nemoto X-Patchwork-Id: 10013 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from wa-out-1516.google.com (wa-out-1516.google.com [209.85.146.160]) by ozlabs.org (Postfix) with ESMTP id 65454DDE1F for ; Sat, 22 Nov 2008 01:12:08 +1100 (EST) Received: by wa-out-1516.google.com with SMTP id l32so760425waf.1 for ; Fri, 21 Nov 2008 06:12:05 -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:date :message-id:to:cc:subject:from:in-reply-to:references:x-fingerprint :x-pgp-public-key:x-mailer:mime-version:content-type:reply-to:sender :precedence:x-google-loop:mailing-list:list-id:list-post:list-help :list-unsubscribe:x-beenthere-env:x-beenthere; bh=0qgqsC1zlMEw+HDdci7oN5rGWM2kL6GVDaSOjx1cLPg=; b=wdL0xmGJGKRr3PjExqq+FwcxTQxvjox4mhxvoS4pwx0TwnYTK0DG1hsraI33ZiInll ghe+dARemCmpOiGQrjrlEm1M4SeBVQ8o1dHqs+GtnzRHQZYsGJvbZzyNnw6jBsU8HGqE D8cxTa9WHGcYkdJckreBAJLr4XE+7GzpjZEcI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-sender:x-apparently-to:received-spf:authentication-results:date :message-id:to:cc:subject:from:in-reply-to:references:x-fingerprint :x-pgp-public-key:x-mailer:mime-version:content-type:reply-to:sender :precedence:x-google-loop:mailing-list:list-id:list-post:list-help :list-unsubscribe:x-beenthere-env:x-beenthere; b=ACxjwJF1BRXbnmR/zzOUZL5HcTh2J8xaqSjX2G3T2TjIrKTfb/5uUposMJAQUqNQYx GySRKUbrLhR44S6rWRdGamEEECa38ijD2AuS3IVt86CmVUz34BKK31E3MDWkloAplDBP 8E9UGFh75BtIJvTITLI8U2CjWt7DS8zmy044A= Received: by 10.140.248.15 with SMTP id v15mr35813rvh.25.1227276722821; Fri, 21 Nov 2008 06:12:02 -0800 (PST) Received: by 10.106.144.6 with SMTP id r6gr1662prd.0; Fri, 21 Nov 2008 06:12:02 -0800 (PST) X-Sender: anemo@mba.ocn.ne.jp X-Apparently-To: rtc-linux@googlegroups.com Received: by 10.115.22.9 with SMTP id z9mr394442wai.28.1227276722076; Fri, 21 Nov 2008 06:12:02 -0800 (PST) Received: from smtp.mba.ocn.ne.jp (mba.ocn.ne.jp [122.1.235.107]) by mx.google.com with ESMTP id m37si455116waf.0.2008.11.21.06.12.01; Fri, 21 Nov 2008 06:12:01 -0800 (PST) Received-SPF: pass (google.com: domain of anemo@mba.ocn.ne.jp designates 122.1.235.107 as permitted sender) client-ip=122.1.235.107; Authentication-Results: mx.google.com; spf=pass (google.com: domain of anemo@mba.ocn.ne.jp designates 122.1.235.107 as permitted sender) smtp.mail=anemo@mba.ocn.ne.jp Received: from localhost (p6091-ipad313funabasi.chiba.ocn.ne.jp [123.217.232.91]) by smtp.mba.ocn.ne.jp (Postfix) with ESMTP id 376FFAB51; Fri, 21 Nov 2008 23:12:00 +0900 (JST) Date: Fri, 21 Nov 2008 23:12:06 +0900 (JST) Message-Id: <20081121.231206.96686926.anemo@mba.ocn.ne.jp> To: alessandro.zummo@towertech.it Cc: rtc-linux@googlegroups.com, linux-mips@linux-mips.org, ralf@linux-mips.org Subject: [rtc-linux] Re: [PATCH 3/4] rtc: Add rtc-tx4939 driver From: Atsushi Nemoto In-Reply-To: <20081120164533.73ba1f7f@i1501.lan.towertech.it> References: <1227194815-16200-1-git-send-email-anemo@mba.ocn.ne.jp> <20081120164533.73ba1f7f@i1501.lan.towertech.it> X-Fingerprint: 6ACA 1623 39BD 9A94 9B1A B746 CA77 FE94 2874 D52F X-Pgp-Public-Key: http://wwwkeys.pgp.net/pks/lookup?op=get&search=0x2874D52F X-Mailer: Mew version 5.2 on Emacs 21.4 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 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 On Thu, 20 Nov 2008 16:45:33 +0100, Alessandro Zummo wrote: > AIE_ON an OFF are mapped to alarm_irq_enable, please see the latest patches > on the rtc mailing list or here http://patchwork.ozlabs.org/patch/9676/ This patch cause deadlock on RTC UIE emulation (again). Please fold this fix into the rtc-add-alarm-update-irq-interfaces patch. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.com/group/rtc-linux . Please read http://groups.google.com/group/rtc-linux/web/checklist before submitting a driver. -~----------~----~----~----~------~----~------~--~--- diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c index 6195f7a..6c39915 100644 --- a/drivers/rtc/interface.c +++ b/drivers/rtc/interface.c @@ -333,9 +333,8 @@ int rtc_update_irq_enable(struct rtc_device *rtc, unsigned int enabled) #ifdef CONFIG_RTC_INTF_DEV_UIE_EMUL if (enabled == 0 && rtc->uie_irq_active) { - err = rtc_dev_update_irq_enable_emul(rtc, enabled); mutex_unlock(&rtc->ops_lock); - return err; + return rtc_dev_update_irq_enable_emul(rtc, enabled); } #endif @@ -353,8 +352,10 @@ int rtc_update_irq_enable(struct rtc_device *rtc, unsigned int enabled) * -EINVAL to signal that it has been configured without * interrupts or that are not available at the moment. */ - if (err == -EINVAL) - err = rtc_dev_update_irq_enable_emul(rtc, enabled); + if (err == -EINVAL) { + mutex_unlock(&rtc->ops_lock); + return rtc_dev_update_irq_enable_emul(rtc, enabled); + } #endif mutex_unlock(&rtc->ops_lock);