From patchwork Wed Apr 7 16:04:23 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 91075 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o37G5bqo005667 for ; Wed, 7 Apr 2010 16:05:39 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932889Ab0DGQFi (ORCPT ); Wed, 7 Apr 2010 12:05:38 -0400 Received: from smtp.nokia.com ([192.100.122.230]:58523 "EHLO mgw-mx03.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932886Ab0DGQFd (ORCPT ); Wed, 7 Apr 2010 12:05:33 -0400 Received: from vaebh106.NOE.Nokia.com (vaebh106.europe.nokia.com [10.160.244.32]) by mgw-mx03.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o37G58fA004996 for ; Wed, 7 Apr 2010 19:05:31 +0300 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by vaebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 7 Apr 2010 19:05:22 +0300 Received: from mgw-da02.ext.nokia.com ([147.243.128.26]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Wed, 7 Apr 2010 19:05:21 +0300 Received: from localhost.localdomain (esdhcp04088.research.nokia.com [172.21.40.88]) by mgw-da02.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o37G4YNG015130; Wed, 7 Apr 2010 19:05:16 +0300 From: felipe.balbi@nokia.com To: Linux OMAP Mailing List Cc: Felipe Balbi Subject: [RFC PATCH 32/37] cbus: retu-rtc: move retu_rtc_barrier up on source code Date: Wed, 7 Apr 2010 19:04:23 +0300 Message-Id: <1270656268-7034-33-git-send-email-felipe.balbi@nokia.com> X-Mailer: git-send-email 1.7.0.rc0.33.g7c3932 In-Reply-To: <1270656268-7034-1-git-send-email-felipe.balbi@nokia.com> References: <1270656268-7034-1-git-send-email-felipe.balbi@nokia.com> X-OriginalArrivalTime: 07 Apr 2010 16:05:21.0764 (UTC) FILETIME=[2025CA40:01CAD66C] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 07 Apr 2010 16:05:39 +0000 (UTC) diff --git a/drivers/cbus/retu-rtc.c b/drivers/cbus/retu-rtc.c index b99c227..90d199e 100644 --- a/drivers/cbus/retu-rtc.c +++ b/drivers/cbus/retu-rtc.c @@ -57,7 +57,15 @@ struct retu_rtc { #define work_to_rtc(r) (container_of(r, struct retu_rtc, work)) -static void retu_rtc_barrier(struct retu_rtc *rtc); +/* This function provides syncronization with the RTCS interrupt handler */ +static void retu_rtc_barrier(struct retu_rtc *rtc) +{ + INIT_COMPLETION(rtc->sync); + retu_ack_irq(RETU_INT_RTCS); + retu_enable_irq(RETU_INT_RTCS); + wait_for_completion(&rtc->sync); + retu_disable_irq(RETU_INT_RTCS); +} static ssize_t retu_rtc_time_show(struct device *dev, struct device_attribute *attr, char *buf) @@ -476,16 +484,6 @@ static struct platform_driver retu_rtc_driver = { }, }; -/* This function provides syncronization with the RTCS interrupt handler */ -static void retu_rtc_barrier(struct retu_rtc *rtc) -{ - INIT_COMPLETION(rtc->sync); - retu_ack_irq(RETU_INT_RTCS); - retu_enable_irq(RETU_INT_RTCS); - wait_for_completion(&rtc->sync); - retu_disable_irq(RETU_INT_RTCS); -} - static int __init retu_rtc_init(void) { return platform_driver_register(&retu_rtc_driver);