diff options
Diffstat (limited to 'sys/dev/usb/if_otus.c')
-rw-r--r-- | sys/dev/usb/if_otus.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/sys/dev/usb/if_otus.c b/sys/dev/usb/if_otus.c index 12bb568f0b7..a3817ce3c68 100644 --- a/sys/dev/usb/if_otus.c +++ b/sys/dev/usb/if_otus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_otus.c,v 1.24 2010/10/30 18:03:43 damien Exp $ */ +/* $OpenBSD: if_otus.c,v 1.25 2010/12/27 03:03:50 jakemsr Exp $ */ /*- * Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr> @@ -105,6 +105,7 @@ static const struct usb_devno otus_devs[] = { int otus_match(struct device *, void *, void *); void otus_attach(struct device *, struct device *, void *); int otus_detach(struct device *, int); +int otus_activate(struct device *, int); void otus_attachhook(void *); void otus_get_chanlist(struct otus_softc *); int otus_load_firmware(struct otus_softc *, const char *, @@ -179,7 +180,8 @@ struct cfdriver otus_cd = { }; const struct cfattach otus_ca = { - sizeof (struct otus_softc), otus_match, otus_attach, otus_detach + sizeof (struct otus_softc), otus_match, otus_attach, otus_detach, + otus_activate }; int @@ -270,6 +272,23 @@ otus_detach(struct device *self, int flags) return 0; } +int +otus_activate(struct device *self, int act) +{ + struct otus_softc *sc = (struct otus_softc *)self; + + switch (act) { + case DVACT_ACTIVATE: + break; + + case DVACT_DEACTIVATE: + usbd_deactivate(sc->sc_udev); + break; + } + + return 0; +} + void otus_attachhook(void *xsc) { |