diff options
Diffstat (limited to 'sys/dev/usb/udfu.c')
-rw-r--r-- | sys/dev/usb/udfu.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/sys/dev/usb/udfu.c b/sys/dev/usb/udfu.c index 2fc8764a655..b64ae3a0e9d 100644 --- a/sys/dev/usb/udfu.c +++ b/sys/dev/usb/udfu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: udfu.c,v 1.1 2009/01/25 02:00:25 fgsch Exp $ */ +/* $OpenBSD: udfu.c,v 1.2 2010/12/27 03:03:50 jakemsr Exp $ */ /* * Copyright (c) 2009 Federico G. Schwindt <fgsch@openbsd.org> @@ -72,6 +72,7 @@ struct udfu_softc { int udfu_match(struct device *, void *, void *); void udfu_attach(struct device *, struct device *, void *); int udfu_detach(struct device *, int); +int udfu_activate(struct device *, int); void udfu_parse_desc(struct udfu_softc *); int udfu_request(struct udfu_softc *, int, int, int, void *, size_t); @@ -84,7 +85,8 @@ const struct cfattach udfu_ca = { sizeof(struct udfu_softc), udfu_match, udfu_attach, - udfu_detach + udfu_detach, + udfu_activate }; int @@ -167,6 +169,23 @@ udfu_detach(struct device *self, int flags) return (0); } +int +udfu_activate(struct device *self, int act) +{ + struct udfu_softc *sc = (struct udfu_softc *)self; + + switch (act) { + case DVACT_ACTIVATE: + break; + + case DVACT_DEACTIVATE: + usbd_deactivate(sc->sc_udev); + break; + } + + return 0; +} + void udfu_parse_desc(struct udfu_softc *sc) { |