mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH][2.5][CHECKER] rtc locking
@ 2003-03-03  4:19 Zwane Mwaikambo
  2003-03-03  4:21 ` Zwane Mwaikambo
  2003-03-03  4:27 ` William Lee Irwin III
  0 siblings, 2 replies; 4+ messages in thread
From: Zwane Mwaikambo @ 2003-03-03  4:19 UTC (permalink / raw)
  To: Linux Kernel

Index: linux-2.5.62-numaq/drivers/char/rtc.c
===================================================================
RCS file: /build/cvsroot/linux-2.5.62/drivers/char/rtc.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 rtc.c
--- linux-2.5.62-numaq/drivers/char/rtc.c	18 Feb 2003 00:15:30 -0000	1.1.1.1
+++ linux-2.5.62-numaq/drivers/char/rtc.c	3 Mar 2003 03:57:09 -0000
@@ -746,13 +746,15 @@
 #else
 	unsigned char tmp;
 
-	spin_lock_irq(&rtc_task_lock);
+	spin_lock_irq(&rtc_lock);
+	spin_lock(&rtc_task_lock);
 	if (rtc_callback != task) {
-		spin_unlock_irq(&rtc_task_lock);
+		spin_unlock(&rtc_task_lock);
+		spin_unlock_irq(rtc_lock);
 		return -ENXIO;
 	}
 	rtc_callback = NULL;
-	spin_lock(&rtc_lock);
+	
 	/* disable controls */
 	tmp = CMOS_READ(RTC_CONTROL);
 	tmp &= ~RTC_PIE;
@@ -765,8 +767,8 @@
 		del_timer(&rtc_irq_timer);
 	}
 	rtc_status &= ~RTC_IS_OPEN;
-	spin_unlock(&rtc_lock);
-	spin_unlock_irq(&rtc_task_lock);
+	spin_unlock(&rtc_task_lock);
+	spin_unlock_irq(&rtc_lock);
 	return 0;
 #endif
 }

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-03-03  4:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-03  4:19 [PATCH][2.5][CHECKER] rtc locking Zwane Mwaikambo
2003-03-03  4:21 ` Zwane Mwaikambo
2003-03-03  4:27 ` William Lee Irwin III
2003-03-03  4:35   ` Zwane Mwaikambo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®