summaryrefslogtreecommitdiff
path: root/sys/dev/usb/ukbd.c
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2014-08-21 14:52:57 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2014-08-21 14:52:57 +0000
commit9be7466795a1454cf435275f2e4d1e903b403464 (patch)
tree8082abf48d1ecca56c6be82aff24b1215bd16fc8 /sys/dev/usb/ukbd.c
parent01a2b3b9eb9c8e6fdd8df2923829938961928284 (diff)
Now that DVACT_DEACTIVATE is propagated to the children of a device when
a driver does not implement a specific *_activate() handler and that our USB stack sets the dying flag before detaching a device, these specific handlers can die.
Diffstat (limited to 'sys/dev/usb/ukbd.c')
-rw-r--r--sys/dev/usb/ukbd.c27
1 files changed, 3 insertions, 24 deletions
diff --git a/sys/dev/usb/ukbd.c b/sys/dev/usb/ukbd.c
index 10af3c3af7c..856bbe50671 100644
--- a/sys/dev/usb/ukbd.c
+++ b/sys/dev/usb/ukbd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ukbd.c,v 1.67 2014/05/12 09:50:44 mpi Exp $ */
+/* $OpenBSD: ukbd.c,v 1.68 2014/08/21 14:52:55 mpi Exp $ */
/* $NetBSD: ukbd.c,v 1.85 2003/03/11 16:44:00 augustss Exp $ */
/*
@@ -162,18 +162,13 @@ const struct wskbd_accessops ukbd_accessops = {
int ukbd_match(struct device *, void *, void *);
void ukbd_attach(struct device *, struct device *, void *);
int ukbd_detach(struct device *, int);
-int ukbd_activate(struct device *, int);
struct cfdriver ukbd_cd = {
NULL, "ukbd", DV_DULL
};
-const struct cfattach ukbd_ca = {
- sizeof(struct ukbd_softc),
- ukbd_match,
- ukbd_attach,
- ukbd_detach,
- ukbd_activate,
+const struct cfattach ukbd_ca = {
+ sizeof(struct ukbd_softc), ukbd_match, ukbd_attach, ukbd_detach
};
struct ukbd_translation {
@@ -308,22 +303,6 @@ ukbd_attach(struct device *parent, struct device *self, void *aux)
}
int
-ukbd_activate(struct device *self, int act)
-{
- struct ukbd_softc *sc = (struct ukbd_softc *)self;
- struct hidkbd *kbd = &sc->sc_kbd;
- int rv = 0;
-
- switch (act) {
- case DVACT_DEACTIVATE:
- if (kbd->sc_wskbddev != NULL)
- rv = config_deactivate(kbd->sc_wskbddev);
- break;
- }
- return (rv);
-}
-
-int
ukbd_detach(struct device *self, int flags)
{
struct ukbd_softc *sc = (struct ukbd_softc *)self;