summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2006-04-20 21:04:37 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2006-04-20 21:04:37 +0000
commitdabf44a58cb03c4d2c9b0b040187257476160c96 (patch)
tree88a30563d021140a8295e0843e606eef71f071d9 /sys/dev/usb
parenta6e9d5ca64b7f61204d7b3842055b3f7f4cb5710 (diff)
open/close/cdevsw code goes bye bye; ok mbalber
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/udcf.c46
1 files changed, 1 insertions, 45 deletions
diff --git a/sys/dev/usb/udcf.c b/sys/dev/usb/udcf.c
index abaa4655320..bbc04149c5c 100644
--- a/sys/dev/usb/udcf.c
+++ b/sys/dev/usb/udcf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udcf.c,v 1.2 2006/04/20 10:12:00 mbalmer Exp $ */
+/* $OpenBSD: udcf.c,v 1.3 2006/04/20 21:04:36 deraadt Exp $ */
/*
* Copyright (c) 2006 Marc Balmer <mbalmer@openbsd.org>
@@ -62,11 +62,8 @@ struct utc {
struct udcf_softc {
USBBASEDEVICE sc_dev; /* base device */
-
usbd_device_handle sc_udev; /* USB device */
-
usbd_interface_handle sc_iface; /* data interface */
-
int sc_refcnt;
u_char sc_dying; /* disconnecting */
@@ -107,9 +104,6 @@ void udcf_bv_probe(void *);
void udcf_mg_probe(void *);
void udcf_sl_probe(void *);
-int udcfopen(dev_t, int, int, usb_proc_ptr);
-int udcfclose(dev_t, int, int, usb_proc_ptr);
-
USB_DECLARE_DRIVER(udcf);
USB_MATCH(udcf)
@@ -257,7 +251,6 @@ fishy:
USB_DETACH(udcf)
{
struct udcf_softc *sc = (struct udcf_softc *)self;
- int maj, mn;
int s;
sc->sc_dying = 1;
@@ -279,16 +272,6 @@ USB_DETACH(udcf)
}
splx(s);
- /* locate the major number */
- for (maj = 0; maj < nchrdev; maj++)
- if (cdevsw[maj].d_open == udcfopen)
- break;
-
- /* Nuke the vnodes for any open instances. */
- mn = self->dv_unit;
- DPRINTF(("udcf_detach: maj=%d mn=%d\n", maj, mn));
- vdevgone(maj, mn, mn, VCHR);
-
usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
USBDEV(sc->sc_dev));
return (0);
@@ -563,30 +546,3 @@ udcf_activate(device_ptr_t self, enum devact act)
}
return (0);
}
-
-int
-udcfopen(dev_t dev, int flag, int mode, usb_proc_ptr tp)
-{
- int unit = minor(dev);
- struct udcf_softc *sc;
-
- if (unit >= udcf_cd.cd_ndevs)
- return (ENXIO);
- sc = udcf_cd.cd_devs[unit];
- if (sc == NULL)
- return (ENXIO);
-
- if (sc->sc_dying)
- return (EIO);
-
- if (ISSET(sc->sc_dev.dv_flags, DVF_ACTIVE) == 0)
- return (ENXIO);
-
- return (0);
-}
-
-int
-udcfclose(dev_t dev, int flag, int mode, usb_proc_ptr p)
-{
- return (0);
-}