patch-2.4.0-test4 linux/drivers/sgi/char/ds1286.c

Next file: linux/drivers/sgi/char/graphics.c
Previous file: linux/drivers/scsi/st.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test3/linux/drivers/sgi/char/ds1286.c linux/drivers/sgi/char/ds1286.c
@@ -38,6 +38,7 @@
 #include <linux/poll.h>
 #include <linux/rtc.h>
 #include <linux/spinlock.h>
+#include <linux/smp_lock.h>
 
 #include <asm/ds1286.h>
 #include <asm/io.h>
@@ -354,7 +355,9 @@
 
 static int ds1286_release(struct inode *inode, struct file *file)
 {
+	lock_kernel();
 	ds1286_status &= ~RTC_IS_OPEN;
+	unlock_kernel();
 	return 0;
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)