lkml.org 
[lkml]   [2003]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH][2.5][CHECKER] rtc locking
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
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:33    [from the cache]
©2003-2011 Jasper Spaans