patch-2.4.0-test8 linux/arch/sparc/prom/devops.c
Next file: linux/arch/sparc/prom/misc.c
Previous file: linux/arch/sparc/prom/devmap.c
Back to the patch index
Back to the overall index
- Lines: 60
- Date:
Mon Aug 28 21:20:03 2000
- Orig file:
v2.4.0-test7/linux/arch/sparc/prom/devops.c
- Orig date:
Tue Feb 1 01:35:43 2000
diff -u --recursive --new-file v2.4.0-test7/linux/arch/sparc/prom/devops.c linux/arch/sparc/prom/devops.c
@@ -1,4 +1,4 @@
-/* $Id: devops.c,v 1.12 2000/01/29 01:09:12 anton Exp $
+/* $Id: devops.c,v 1.13 2000/08/26 02:38:03 anton Exp $
* devops.c: Device operations using the PROM.
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
@@ -21,7 +21,7 @@
{
int handle;
unsigned long flags;
- save_flags(flags); cli();
+ spin_lock_irqsave(&prom_lock, flags);
switch(prom_vers) {
case PROM_V0:
handle = (*(romvec->pv_v0devops.v0_devopen))(dstr);
@@ -36,7 +36,7 @@
break;
};
restore_current();
- restore_flags(flags);
+ spin_unlock_irqrestore(&prom_lock, flags);
return handle;
}
@@ -46,7 +46,7 @@
prom_devclose(int dhandle)
{
unsigned long flags;
- save_flags(flags); cli();
+ spin_lock_irqsave(&prom_lock, flags);
switch(prom_vers) {
case PROM_V0:
(*(romvec->pv_v0devops.v0_devclose))(dhandle);
@@ -59,7 +59,7 @@
break;
};
restore_current();
- restore_flags(flags);
+ spin_unlock_irqrestore(&prom_lock, flags);
return 0;
}
@@ -70,7 +70,7 @@
prom_seek(int dhandle, unsigned int seekhi, unsigned int seeklo)
{
unsigned long flags;
- save_flags(flags); cli();
+ spin_lock_irqsave(&prom_lock, flags);
switch(prom_vers) {
case PROM_V0:
(*(romvec->pv_v0devops.v0_seekdev))(dhandle, seekhi, seeklo);
@@ -83,7 +83,7 @@
break;
};
restore_current();
- restore_flags(flags);
+ spin_unlock_irqrestore(&prom_lock, flags);
return;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)