diff mbox

[RFC,32/37] cbus: retu-rtc: move retu_rtc_barrier up on source code

Message ID 1270656268-7034-33-git-send-email-felipe.balbi@nokia.com (mailing list archive)
State Accepted, archived
Delegated to: Tony Lindgren
Headers show

Commit Message

Felipe Balbi April 7, 2010, 4:04 p.m. UTC
None
diff mbox

Patch

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);