usbhid.c (18250ec6c089c0c50cbd9fd87d78e03ff89916df) | usbhid.c (3ddaf8200bc90b1410755ebac7b5c979ea90a2f6) |
---|---|
1/*- 2 * SPDX-License-Identifier: BSD-2-Clause 3 * 4 * Copyright (c) 1998 The NetBSD Foundation, Inc. 5 * Copyright (c) 2019 Vladimir Kondratyev <wulf@FreeBSD.org> 6 * 7 * This code is derived from software contributed to The NetBSD Foundation 8 * by Lennart Augustsson (lennart@augustsson.net) at --- 837 unchanged lines hidden (view full) --- 846 847 return (0); /* success */ 848} 849 850static int 851usbhid_detach(device_t dev) 852{ 853 struct usbhid_softc *sc = device_get_softc(dev); | 1/*- 2 * SPDX-License-Identifier: BSD-2-Clause 3 * 4 * Copyright (c) 1998 The NetBSD Foundation, Inc. 5 * Copyright (c) 2019 Vladimir Kondratyev <wulf@FreeBSD.org> 6 * 7 * This code is derived from software contributed to The NetBSD Foundation 8 * by Lennart Augustsson (lennart@augustsson.net) at --- 837 unchanged lines hidden (view full) --- 846 847 return (0); /* success */ 848} 849 850static int 851usbhid_detach(device_t dev) 852{ 853 struct usbhid_softc *sc = device_get_softc(dev); |
854 int error; |
|
854 | 855 |
855 device_delete_children(dev); | 856 error = bus_generic_detach(dev); 857 if (error != 0) 858 return (error); 859 |
856 mtx_destroy(&sc->sc_mtx); 857 858 return (0); 859} 860 861static device_method_t usbhid_methods[] = { 862 DEVMETHOD(device_probe, usbhid_probe), 863 DEVMETHOD(device_attach, usbhid_attach), --- 33 unchanged lines hidden --- | 860 mtx_destroy(&sc->sc_mtx); 861 862 return (0); 863} 864 865static device_method_t usbhid_methods[] = { 866 DEVMETHOD(device_probe, usbhid_probe), 867 DEVMETHOD(device_attach, usbhid_attach), --- 33 unchanged lines hidden --- |