summaryrefslogtreecommitdiffstats
path: root/sys/dev/bktr
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2009-08-20 19:17:53 +0000
committerjhb <jhb@FreeBSD.org>2009-08-20 19:17:53 +0000
commit9b0755de9f1e9517732f96a37f0ef30b8db23811 (patch)
treeee9b2a74c07c732ee357d4810494c3b6aecd6e71 /sys/dev/bktr
parentab0b6203abac22f7fa981c24cf452d3dab032727 (diff)
downloadFreeBSD-src-9b0755de9f1e9517732f96a37f0ef30b8db23811.zip
FreeBSD-src-9b0755de9f1e9517732f96a37f0ef30b8db23811.tar.gz
Temporarily revert the new-bus locking for 8.0 release. It will be
reintroduced after HEAD is reopened for commits by re@. Approved by: re (kib), attilio
Diffstat (limited to 'sys/dev/bktr')
-rw-r--r--sys/dev/bktr/bktr_os.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/sys/dev/bktr/bktr_os.c b/sys/dev/bktr/bktr_os.c
index 1fd458c..327c4bb 100644
--- a/sys/dev/bktr/bktr_os.c
+++ b/sys/dev/bktr/bktr_os.c
@@ -597,9 +597,7 @@ bktr_open( struct cdev *dev, int flags, int fmt, struct thread *td )
return( ENXIO );
/* Record that the device is now busy */
- newbus_xlock();
device_busy(devclass_get_device(bktr_devclass, unit));
- newbus_xunlock();
if (bt848_card != -1) {
@@ -670,11 +668,8 @@ bktr_open( struct cdev *dev, int flags, int fmt, struct thread *td )
}
/* If there was an error opening the device, undo the busy status */
- if (result != 0) {
- newbus_xlock();
+ if (result != 0)
device_unbusy(devclass_get_device(bktr_devclass, unit));
- newbus_xunlock();
- }
return( result );
}
@@ -694,7 +689,6 @@ bktr_close( struct cdev *dev, int flags, int fmt, struct thread *td )
/* Get the device data */
bktr = (struct bktr_softc*)devclass_get_softc(bktr_devclass, unit);
if (bktr == NULL) {
-
/* the device is no longer valid/functioning */
return (ENXIO);
}
@@ -711,11 +705,10 @@ bktr_close( struct cdev *dev, int flags, int fmt, struct thread *td )
break;
default:
return (ENXIO);
+ break;
}
- newbus_xlock();
device_unbusy(devclass_get_device(bktr_devclass, unit));
- newbus_xunlock();
return( result );
}
OpenPOWER on IntegriCloud