zy7_ehci.c (5b56413d04e608379c9a306373554a8e4d321bc0) | zy7_ehci.c (3ddaf8200bc90b1410755ebac7b5c979ea90a2f6) |
---|---|
1/*- 2 * SPDX-License-Identifier: BSD-2-Clause 3 * 4 * Copyright (c) 2012-2013 Thomas Skibo 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 301 unchanged lines hidden (view full) --- 310 311 return (0); 312} 313 314static int 315zy7_ehci_detach(device_t dev) 316{ 317 ehci_softc_t *sc = device_get_softc(dev); | 1/*- 2 * SPDX-License-Identifier: BSD-2-Clause 3 * 4 * Copyright (c) 2012-2013 Thomas Skibo 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 301 unchanged lines hidden (view full) --- 310 311 return (0); 312} 313 314static int 315zy7_ehci_detach(device_t dev) 316{ 317 ehci_softc_t *sc = device_get_softc(dev); |
318 int error; |
|
318 319 /* during module unload there are lots of children leftover */ | 319 320 /* during module unload there are lots of children leftover */ |
320 device_delete_children(dev); | 321 error = bus_generic_detach(dev); 322 if (error != 0) 323 return (error); |
321 322 if ((sc->sc_flags & EHCI_SCFLG_DONEINIT) != 0) { 323 ehci_detach(sc); 324 sc->sc_flags &= ~EHCI_SCFLG_DONEINIT; 325 } 326 327 if (sc->sc_irq_res) { 328 if (sc->sc_intr_hdl != NULL) --- 37 unchanged lines hidden --- | 324 325 if ((sc->sc_flags & EHCI_SCFLG_DONEINIT) != 0) { 326 ehci_detach(sc); 327 sc->sc_flags &= ~EHCI_SCFLG_DONEINIT; 328 } 329 330 if (sc->sc_irq_res) { 331 if (sc->sc_intr_hdl != NULL) --- 37 unchanged lines hidden --- |