diff options
Diffstat (limited to 'sys/dev/ismt/ismt.c')
-rw-r--r-- | sys/dev/ismt/ismt.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/dev/ismt/ismt.c b/sys/dev/ismt/ismt.c index 3f3c7bdf26c8..5e6b7c8ebf18 100644 --- a/sys/dev/ismt/ismt.c +++ b/sys/dev/ismt/ismt.c @@ -532,8 +532,6 @@ ismt_detach(device_t dev) if (error) return (error); - device_delete_child(dev, sc->smbdev); - if (sc->intr_handle != NULL) { bus_teardown_intr(dev, sc->intr_res, sc->intr_handle); sc->intr_handle = NULL; @@ -588,7 +586,8 @@ ismt_attach(device_t dev) sc->pcidev = dev; pci_enable_busmaster(dev); - if ((sc->smbdev = device_add_child(dev, "smbus", -1)) == NULL) { + if ((sc->smbdev = device_add_child(dev, "smbus", + DEVICE_UNIT_ANY)) == NULL) { device_printf(dev, "no smbus child found\n"); err = ENXIO; goto fail; @@ -607,11 +606,7 @@ ismt_attach(device_t dev) sc->mmio_handle = rman_get_bushandle(sc->mmio_res); /* Attach "smbus" child */ - if ((err = bus_generic_attach(dev)) != 0) { - device_printf(dev, "failed to attach child: %d\n", err); - err = ENXIO; - goto fail; - } + bus_attach_children(dev); bus_dma_tag_create(bus_get_dma_tag(dev), 4, PAGE_SIZE, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, |