diff options
Diffstat (limited to 'sys/dev/qcom_qup/qcom_spi.c')
-rw-r--r-- | sys/dev/qcom_qup/qcom_spi.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/dev/qcom_qup/qcom_spi.c b/sys/dev/qcom_qup/qcom_spi.c index b7e4d6519a36..87e70d531324 100644 --- a/sys/dev/qcom_qup/qcom_spi.c +++ b/sys/dev/qcom_qup/qcom_spi.c @@ -420,7 +420,7 @@ qcom_spi_attach(device_t dev) } QCOM_SPI_UNLOCK(sc); - sc->spibus = device_add_child(dev, "spibus", -1); + sc->spibus = device_add_child(dev, "spibus", DEVICE_UNIT_ANY); /* We're done, so shut down the interface clock for now */ device_printf(dev, "DONE: shutting down interface clock for now\n"); @@ -429,7 +429,8 @@ qcom_spi_attach(device_t dev) /* Register for debug sysctl */ qcom_spi_sysctl_attach(sc); - return (bus_generic_attach(dev)); + bus_attach_children(dev); + return (0); error: if (sc->sc_irq_h) bus_teardown_intr(dev, sc->sc_irq_res, sc->sc_irq_h); @@ -839,8 +840,6 @@ qcom_spi_detach(device_t dev) int i; bus_generic_detach(sc->sc_dev); - if (sc->spibus != NULL) - device_delete_child(dev, sc->spibus); if (sc->sc_irq_h) bus_teardown_intr(dev, sc->sc_irq_res, sc->sc_irq_h); |