aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/bwn/if_bwn_pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/bwn/if_bwn_pci.c')
-rw-r--r--sys/dev/bwn/if_bwn_pci.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/sys/dev/bwn/if_bwn_pci.c b/sys/dev/bwn/if_bwn_pci.c
index e2ba15dd67c8..a64c53acf40f 100644
--- a/sys/dev/bwn/if_bwn_pci.c
+++ b/sys/dev/bwn/if_bwn_pci.c
@@ -182,24 +182,13 @@ bwn_pci_attach(device_t dev)
sc->quirks = ident->quirks;
/* Attach bridge device */
- if ((error = bhndb_attach_bridge(dev, &sc->bhndb_dev, -1)))
+ if ((error = bhndb_attach_bridge(dev, &sc->bhndb_dev, DEVICE_UNIT_ANY)))
return (ENXIO);
/* Success */
return (0);
}
-static int
-bwn_pci_detach(device_t dev)
-{
- int error;
-
- if ((error = bus_generic_detach(dev)))
- return (error);
-
- return (device_delete_children(dev));
-}
-
static void
bwn_pci_probe_nomatch(device_t dev, device_t child)
{
@@ -268,7 +257,7 @@ static device_method_t bwn_pci_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, bwn_pci_probe),
DEVMETHOD(device_attach, bwn_pci_attach),
- DEVMETHOD(device_detach, bwn_pci_detach),
+ DEVMETHOD(device_detach, bus_generic_detach),
DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD(device_suspend, bus_generic_suspend),
DEVMETHOD(device_resume, bus_generic_resume),