summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/bluetooth/drivers
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-09-28 20:48:13 +0000
committerphk <phk@FreeBSD.org>2003-09-28 20:48:13 +0000
commit050117a32706566ff27f8d7610837a96932e0d3d (patch)
tree4c59531a9f82b488f7fca22115ecb97e22c4abb0 /sys/netgraph/bluetooth/drivers
parent184a5c6d6515c512601948f88c75a8e3ce1bf3c4 (diff)
downloadFreeBSD-src-050117a32706566ff27f8d7610837a96932e0d3d.zip
FreeBSD-src-050117a32706566ff27f8d7610837a96932e0d3d.tar.gz
I don't know from where the notion that device driver should or
even could call VOP_REVOKE() on vnodes associated with its dev_t's has originated, but it stops right here. If there are things people belive destroy_dev() needs to learn how to do, please tell me about it, preferably with a reproducible test case. Include <sys/uio.h> in bluetooth code rather than rely on <sys/vnode.h> to do so. The fact that some of the USB code needs to include <sys/vnode.h> still disturbs me greatly, but I do not have time to chase that.
Diffstat (limited to 'sys/netgraph/bluetooth/drivers')
-rw-r--r--sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c15
-rw-r--r--sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c16
2 files changed, 2 insertions, 29 deletions
diff --git a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c
index 625e92b8..5f98d8d 100644
--- a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c
+++ b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c
@@ -40,7 +40,7 @@
#include <sys/malloc.h>
#include <sys/kernel.h>
#include <sys/poll.h>
-#include <sys/vnode.h>
+#include <sys/uio.h>
#include <machine/bus.h>
#include <dev/usb/usb.h>
@@ -2704,7 +2704,6 @@ ubt_create_device_nodes(ubt_softc_p sc)
Static void
ubt_destroy_device_nodes(ubt_softc_p sc)
{
- struct vnode *vp = NULL;
/*
* Wait for processes to go away. This should be safe as we will not
@@ -2721,28 +2720,16 @@ ubt_destroy_device_nodes(ubt_softc_p sc)
/* Destroy device nodes */
if (sc->sc_bulk_dev != NODEV) {
- vp = SLIST_FIRST(&sc->sc_bulk_dev->si_hlist);
- if (vp != NULL)
- VOP_REVOKE(vp, REVOKEALL);
-
destroy_dev(sc->sc_bulk_dev);
sc->sc_bulk_dev = NODEV;
}
if (sc->sc_intr_dev != NODEV) {
- vp = SLIST_FIRST(&sc->sc_intr_dev->si_hlist);
- if (vp != NULL)
- VOP_REVOKE(vp, REVOKEALL);
-
destroy_dev(sc->sc_intr_dev);
sc->sc_intr_dev = NODEV;
}
if (sc->sc_ctrl_dev != NODEV) {
- vp = SLIST_FIRST(&sc->sc_ctrl_dev->si_hlist);
- if (vp != NULL)
- VOP_REVOKE(vp, REVOKEALL);
-
destroy_dev(sc->sc_ctrl_dev);
sc->sc_ctrl_dev = NODEV;
}
diff --git a/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c b/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c
index acd51ce..5fbcd06 100644
--- a/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c
+++ b/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c
@@ -39,7 +39,7 @@
#include <sys/poll.h>
#include <sys/proc.h>
#include <sys/sysctl.h>
-#include <sys/vnode.h>
+#include <sys/uio.h>
#include <dev/usb/usb.h>
#include <dev/usb/usbdi.h>
@@ -220,8 +220,6 @@ USB_DETACH(ubtbcmfw)
{
USB_DETACH_START(ubtbcmfw, sc);
- struct vnode *vp = NULL;
-
sc->sc_dying = 1;
if (-- sc->sc_refcnt >= 0) {
@@ -236,28 +234,16 @@ USB_DETACH(ubtbcmfw)
/* Destroy device nodes */
if (sc->sc_bulk_out_dev != NODEV) {
- vp = SLIST_FIRST(&sc->sc_bulk_out_dev->si_hlist);
- if (vp != NULL)
- VOP_REVOKE(vp, REVOKEALL);
-
destroy_dev(sc->sc_bulk_out_dev);
sc->sc_bulk_out_dev = NODEV;
}
if (sc->sc_intr_in_dev != NODEV) {
- vp = SLIST_FIRST(&sc->sc_intr_in_dev->si_hlist);
- if (vp != NULL)
- VOP_REVOKE(vp, REVOKEALL);
-
destroy_dev(sc->sc_intr_in_dev);
sc->sc_intr_in_dev = NODEV;
}
if (sc->sc_ctrl_dev != NODEV) {
- vp = SLIST_FIRST(&sc->sc_ctrl_dev->si_hlist);
- if (vp != NULL)
- VOP_REVOKE(vp, REVOKEALL);
-
destroy_dev(sc->sc_ctrl_dev);
sc->sc_ctrl_dev = NODEV;
}
OpenPOWER on IntegriCloud