Re: [PATCH][2.5][CHECKER] rtc locking

Zwane Mwaikambo (zwane@linuxpower.ca)
Sun, 2 Mar 2003 23:21:58 -0500 (EST)


oops missing ampersand

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 04:21: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
}

-- 
function.linuxpower.ca
-
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/