From 9be7466795a1454cf435275f2e4d1e903b403464 Mon Sep 17 00:00:00 2001 From: Martin Pieuchot Date: Thu, 21 Aug 2014 14:52:57 +0000 Subject: 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. --- sys/dev/usb/ukbd.c | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) (limited to 'sys/dev/usb/ukbd.c') 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 { @@ -307,22 +302,6 @@ ukbd_attach(struct device *parent, struct device *self, void *aux) hidkbd_attach_wskbd(kbd, layout, &ukbd_accessops); } -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) { -- cgit v1.2.3