git: 18250ec6c089 - main - Replace calls to bus_generic_attach with bus_attach_children

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Fri, 06 Dec 2024 22:29:18 UTC
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=18250ec6c089c0c50cbd9fd87d78e03ff89916df

commit 18250ec6c089c0c50cbd9fd87d78e03ff89916df
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2024-12-06 22:26:16 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2024-12-06 22:26:16 +0000

    Replace calls to bus_generic_attach with bus_attach_children
    
    Reviewed by:    imp
    Differential Revision:  https://reviews.freebsd.org/D47675
---
 sys/amd64/acpica/acpi_machdep.c                    |  3 ++-
 sys/arm/allwinner/aw_rsb.c                         |  2 +-
 sys/arm/annapurna/alpine/alpine_pci_msix.c         |  3 ++-
 sys/arm/arm/gic_acpi.c                             |  2 +-
 sys/arm/arm/gic_fdt.c                              |  2 +-
 sys/arm/arm/nexus.c                                |  2 +-
 sys/arm/broadcom/bcm2835/bcm2835_clkman.c          |  3 ++-
 sys/arm/broadcom/bcm2835/bcm2835_pwm.c             |  3 ++-
 sys/arm/broadcom/bcm2835/bcm2835_sdhci.c           |  2 +-
 sys/arm/broadcom/bcm2835/bcm2835_sdhost.c          |  2 +-
 sys/arm/broadcom/bcm2835/bcm2835_spi.c             |  3 ++-
 sys/arm/broadcom/bcm2835/bcm2838_pci.c             |  3 ++-
 sys/arm/freescale/vybrid/vf_spi.c                  |  3 ++-
 sys/arm/mv/a37x0_iic.c                             |  3 ++-
 sys/arm/mv/mv_pci.c                                |  3 ++-
 sys/arm/mv/mv_pci_ctrl.c                           |  3 ++-
 sys/arm/mv/mvebu_gpio.c                            |  3 ++-
 sys/arm/nvidia/as3722.c                            |  3 ++-
 sys/arm/nvidia/drm2/tegra_dc.c                     |  3 ++-
 sys/arm/nvidia/drm2/tegra_hdmi.c                   |  3 ++-
 sys/arm/nvidia/drm2/tegra_host1x.c                 |  3 ++-
 sys/arm/nvidia/tegra_abpmisc.c                     |  3 ++-
 sys/arm/nvidia/tegra_efuse.c                       |  3 ++-
 sys/arm/nvidia/tegra_gpio.c                        |  3 ++-
 sys/arm/nvidia/tegra_i2c.c                         |  3 ++-
 sys/arm/nvidia/tegra_mc.c                          |  3 ++-
 sys/arm/nvidia/tegra_pcie.c                        |  3 ++-
 sys/arm/nvidia/tegra_rtc.c                         |  3 ++-
 sys/arm/nvidia/tegra_sdhci.c                       |  2 +-
 sys/arm/nvidia/tegra_soctherm.c                    |  3 ++-
 sys/arm/qualcomm/ipq4018_usb_hs_phy.c              |  3 ++-
 sys/arm/qualcomm/ipq4018_usb_ss_phy.c              |  3 ++-
 sys/arm/ti/am335x/am335x_ehrpwm.c                  |  3 ++-
 sys/arm/ti/am335x/am335x_pwmss.c                   |  3 ++-
 sys/arm/ti/am335x/am335x_usb_phy.c                 |  3 ++-
 sys/arm/ti/clk/ti_clkctrl.c                        |  3 ++-
 sys/arm/ti/clk/ti_divider_clock.c                  |  9 ++++++---
 sys/arm/ti/clk/ti_dpll_clock.c                     |  9 ++++++---
 sys/arm/ti/clk/ti_gate_clock.c                     |  9 ++++++---
 sys/arm/ti/clk/ti_mux_clock.c                      |  9 ++++++---
 sys/arm/ti/cpsw/if_cpsw.c                          |  2 +-
 sys/arm/ti/ti_omap4_cm.c                           |  3 ++-
 sys/arm/ti/ti_prcm.c                               |  4 ++--
 sys/arm/ti/ti_scm.c                                |  3 ++-
 sys/arm/ti/ti_scm_syscon.c                         |  3 ++-
 sys/arm/ti/ti_sdhci.c                              |  2 +-
 sys/arm/ti/ti_spi.c                                |  3 ++-
 sys/arm/ti/ti_sysc.c                               |  8 +++++---
 sys/arm/ti/twl/twl.c                               |  3 ++-
 sys/arm/ti/usb/omap_host.c                         |  3 ++-
 sys/arm64/arm64/gic_v3_acpi.c                      |  2 +-
 sys/arm64/arm64/gic_v3_fdt.c                       |  3 ++-
 sys/arm64/arm64/nexus.c                            |  2 +-
 sys/arm64/broadcom/brcmmdio/mdio_mux_iproc.c       |  3 ++-
 sys/arm64/broadcom/brcmmdio/mdio_nexus_iproc.c     |  3 ++-
 sys/arm64/broadcom/brcmmdio/mdio_ns2_pcie_phy.c    |  3 ++-
 sys/arm64/cavium/thunder_pcie_pem.c                |  4 ++--
 sys/arm64/nvidia/tegra210/max77620.c               |  3 ++-
 sys/arm64/nvidia/tegra210/max77620_rtc.c           |  3 ++-
 sys/arm64/qoriq/qoriq_dw_pci.c                     |  3 ++-
 sys/arm64/qoriq/qoriq_therm.c                      |  3 ++-
 sys/arm64/rockchip/rk3568_pcie.c                   |  3 ++-
 sys/arm64/rockchip/rk_pcie.c                       |  3 ++-
 sys/arm64/rockchip/rk_pinctrl.c                    |  3 ++-
 sys/arm64/rockchip/rk_tsadc.c                      |  3 ++-
 sys/arm64/rockchip/rk_usbphy.c                     |  3 ++-
 sys/compat/linuxkpi/common/src/linux_i2c.c         | 11 ++---------
 sys/compat/linuxkpi/common/src/linux_i2cbb.c       | 11 ++---------
 sys/contrib/vchiq/interface/vchiq_arm/vchiq_kmod.c |  2 +-
 sys/dev/aac/aac.c                                  |  7 +++----
 sys/dev/aacraid/aacraid.c                          |  4 ++--
 sys/dev/acpi_support/acpi_wmi.c                    |  2 +-
 sys/dev/acpica/acpi.c                              |  4 ++--
 sys/dev/acpica/acpi_container.c                    |  3 ++-
 sys/dev/acpica/acpi_cpu.c                          |  2 +-
 sys/dev/acpica/acpi_pcib_acpi.c                    |  3 ++-
 sys/dev/adb/adb_bus.c                              |  2 +-
 sys/dev/ahci/ahci.c                                |  2 +-
 sys/dev/alpm/alpm.c                                |  2 +-
 sys/dev/amdpm/amdpm.c                              |  2 +-
 sys/dev/amdsmb/amdsmb.c                            |  2 +-
 sys/dev/ata/ata-pci.c                              |  2 +-
 sys/dev/ata/chipsets/ata-jmicron.c                 |  2 +-
 sys/dev/ata/chipsets/ata-marvell.c                 |  2 +-
 sys/dev/atkbdc/atkbdc_isa.c                        |  2 +-
 sys/dev/atopcase/atopcase.c                        |  3 ++-
 sys/dev/bhnd/bhndb/bhndb_pci.c                     |  3 +--
 sys/dev/bhnd/cores/chipc/chipc.c                   |  5 ++---
 sys/dev/bhnd/cores/chipc/chipc_spi.c               |  3 +--
 sys/dev/bhnd/cores/pci/bhnd_pci.c                  | 10 +---------
 sys/dev/bhnd/cores/pcie2/bhnd_pcie2.c              | 10 +---------
 sys/dev/cfi/cfi_core.c                             |  2 +-
 sys/dev/clk/allwinner/aw_ccu.c                     |  3 ++-
 sys/dev/clk/clk_bus.c                              |  3 ++-
 sys/dev/clk/clk_fixed.c                            |  3 ++-
 sys/dev/cxgb/cxgb_main.c                           |  3 +--
 sys/dev/cxgbe/t4_main.c                            |  9 ++-------
 sys/dev/cxgbe/t4_vf.c                              |  7 +------
 sys/dev/dpaa/bman_portals.c                        |  3 ++-
 sys/dev/dpaa/fman.c                                |  3 ++-
 sys/dev/dpaa/qman_portals.c                        |  3 ++-
 sys/dev/dpaa2/dpaa2_mc.c                           |  2 +-
 sys/dev/dpaa2/dpaa2_rc.c                           | 17 +++++------------
 sys/dev/dpaa2/memac_mdio_acpi.c                    |  2 +-
 sys/dev/drm2/drm_dp_iic_helper.c                   |  2 +-
 sys/dev/dwwdt/dwwdt.c                              |  3 ++-
 sys/dev/etherswitch/ar40xx/ar40xx_main.c           |  2 +-
 sys/dev/etherswitch/arswitch/arswitch.c            |  7 +------
 sys/dev/etherswitch/e6000sw/e6000sw.c              |  2 +-
 sys/dev/etherswitch/e6000sw/e6060sw.c              |  4 +---
 sys/dev/etherswitch/felix/felix.c                  |  2 +-
 sys/dev/etherswitch/infineon/adm6996fc.c           |  4 +---
 sys/dev/etherswitch/ip17x/ip17x.c                  |  4 +---
 sys/dev/etherswitch/micrel/ksz8995ma.c             |  4 +---
 sys/dev/etherswitch/miiproxy.c                     | 13 +++++--------
 sys/dev/etherswitch/mtkswitch/mtkswitch.c          |  5 +----
 sys/dev/etherswitch/rtl8366/rtl8366rb.c            |  4 +---
 sys/dev/etherswitch/ukswitch/ukswitch.c            |  4 +---
 sys/dev/fdc/fdc.c                                  |  5 ++---
 sys/dev/fdc/fdc_acpi.c                             |  3 ++-
 sys/dev/fdt/simple_mfd.c                           |  3 ++-
 sys/dev/fdt/simplebus.c                            |  3 ++-
 sys/dev/firewire/firewire.c                        |  2 +-
 sys/dev/firewire/fwohci_pci.c                      |  2 +-
 sys/dev/firmware/arm/scmi.c                        |  4 ++--
 sys/dev/firmware/xilinx/zynqmp_firmware.c          |  3 ++-
 sys/dev/flash/cqspi.c                              |  2 +-
 sys/dev/gpio/dwgpio/dwgpio_bus.c                   |  3 ++-
 sys/dev/gpio/gpiobus.c                             |  7 ++++---
 sys/dev/gpio/gpioiic.c                             |  3 ++-
 sys/dev/gpio/gpiospi.c                             |  3 ++-
 sys/dev/gpio/ofw_gpiobus.c                         |  3 ++-
 sys/dev/hid/hidbus.c                               |  7 ++++---
 sys/dev/hyperv/input/hv_hid.c                      |  4 +---
 sys/dev/hyperv/pcib/vmbus_pcib.c                   |  2 +-
 sys/dev/hyperv/vmbus/vmbus.c                       |  2 +-
 sys/dev/ichiic/ig4_iic.c                           |  6 +-----
 sys/dev/ida/ida.c                                  |  2 +-
 sys/dev/iicbus/controller/opencores/iicoc_pci.c    |  2 +-
 sys/dev/iicbus/controller/rockchip/rk_i2c.c        |  2 +-
 sys/dev/iicbus/controller/twsi/twsi.c              |  2 +-
 sys/dev/iicbus/controller/vybrid/vf_i2c.c          |  2 +-
 sys/dev/iicbus/iicbb.c                             |  2 +-
 sys/dev/iicbus/iicbus.c                            |  2 +-
 sys/dev/iicbus/iichid.c                            |  7 ++-----
 sys/dev/iicbus/iicsmb.c                            |  2 +-
 sys/dev/iicbus/mux/iic_gpiomux.c                   |  2 +-
 sys/dev/iicbus/mux/ltc430x.c                       |  2 +-
 sys/dev/iicbus/mux/pca9547.c                       |  2 +-
 sys/dev/iicbus/mux/pca954x.c                       |  2 +-
 sys/dev/iicbus/ofw_iicbus.c                        |  3 ++-
 sys/dev/iicbus/pmic/act8846.c                      |  3 ++-
 sys/dev/imcsmb/imcsmb.c                            |  5 ++---
 sys/dev/imcsmb/imcsmb_pci.c                        |  6 ++----
 sys/dev/ips/ips.c                                  |  4 +---
 sys/dev/ismt/ismt.c                                |  6 +-----
 sys/dev/mdio/mdio.c                                |  3 ++-
 sys/dev/mfi/mfi.c                                  |  6 +++---
 sys/dev/mge/if_mge.c                               |  2 +-
 sys/dev/mii/mii.c                                  | 11 ++++-------
 sys/dev/mlx/mlx.c                                  |  5 ++---
 sys/dev/mmc/mmc.c                                  |  2 +-
 sys/dev/msk/if_msk.c                               |  6 +-----
 sys/dev/mvs/mvs_pci.c                              |  2 +-
 sys/dev/mvs/mvs_soc.c                              |  2 +-
 sys/dev/neta/if_mvneta.c                           |  4 ++--
 sys/dev/nfsmb/nfsmb.c                              |  4 ++--
 sys/dev/ntb/ntb.c                                  |  2 +-
 sys/dev/ntb/ntb_transport.c                        |  2 +-
 sys/dev/nvdimm/nvdimm_acpi.c                       |  4 +---
 sys/dev/ofw/ofw_cpu.c                              |  6 ++++--
 sys/dev/ofw/ofw_firmware.c                         |  3 ++-
 sys/dev/ofw/ofw_pcib.c                             |  3 ++-
 sys/dev/ofw/ofwbus.c                               |  3 ++-
 sys/dev/ow/ow.c                                    |  3 ++-
 sys/dev/p2sb/lewisburg_gpiocm.c                    |  3 ++-
 sys/dev/p2sb/p2sb.c                                |  3 ++-
 sys/dev/pcf/pcf_isa.c                              |  2 +-
 sys/dev/pci/controller/pci_n1sdp.c                 |  3 ++-
 sys/dev/pci/hostb_pci.c                            |  2 +-
 sys/dev/pci/pci.c                                  |  3 ++-
 sys/dev/pci/pci_dw_mv.c                            |  3 ++-
 sys/dev/pci/pci_host_generic_acpi.c                |  3 ++-
 sys/dev/pci/pci_host_generic_den0115.c             |  3 ++-
 sys/dev/pci/pci_host_generic_fdt.c                 |  3 ++-
 sys/dev/pci/pci_iov.c                              |  2 +-
 sys/dev/pci/pci_pci.c                              |  5 +++--
 sys/dev/pci/vga_pci.c                              |  2 +-
 sys/dev/ppbus/ppbconf.c                            |  2 +-
 sys/dev/psci/psci.c                                |  2 +-
 sys/dev/psci/smccc.c                               |  3 ++-
 sys/dev/pst/pst-pci.c                              |  3 ++-
 sys/dev/pwm/controller/allwinner/aw_pwm.c          |  3 ++-
 sys/dev/pwm/controller/rockchip/rk_pwm.c           |  3 ++-
 sys/dev/pwm/ofw_pwmbus.c                           |  3 ++-
 sys/dev/pwm/pwmbus.c                               |  3 ++-
 sys/dev/qcom_dwc3/qcom_dwc3.c                      |  3 ++-
 sys/dev/qcom_qup/qcom_spi.c                        |  3 ++-
 sys/dev/regulator/regulator_bus.c                  |  3 ++-
 sys/dev/regulator/regulator_fixed.c                |  9 ++++++---
 sys/dev/sdhci/fsl_sdhci.c                          |  2 +-
 sys/dev/sdhci/sdhci_fsl_fdt.c                      |  3 ++-
 sys/dev/siis/siis.c                                |  2 +-
 sys/dev/sk/if_sk.c                                 |  6 +-----
 sys/dev/smbus/smbus.c                              |  2 +-
 sys/dev/sound/pci/csa.c                            |  2 +-
 sys/dev/sound/pci/emu10kx.c                        |  3 ++-
 sys/dev/sound/pci/fm801.c                          |  2 +-
 sys/dev/sound/pci/hda/hdaa.c                       |  4 ++--
 sys/dev/sound/pci/hda/hdac.c                       |  2 +-
 sys/dev/sound/pci/hda/hdacc.c                      |  2 +-
 sys/dev/sound/pci/hdsp.c                           |  3 ++-
 sys/dev/sound/pci/hdspe.c                          |  4 ++--
 sys/dev/sound/usb/uaudio.c                         |  5 +----
 sys/dev/spibus/controller/allwinner/aw_spi.c       |  3 ++-
 sys/dev/spibus/controller/rockchip/rk_spi.c        |  3 ++-
 sys/dev/spibus/ofw_spibus.c                        |  3 ++-
 sys/dev/spibus/spibus.c                            |  3 ++-
 sys/dev/sram/mmio_sram.c                           |  3 ++-
 sys/dev/superio/superio.c                          |  2 +-
 sys/dev/syscon/syscon_generic.c                    |  3 ++-
 sys/dev/usb/controller/dwc3/aw_dwc3.c              |  3 ++-
 sys/dev/usb/controller/dwc3/rk_dwc3.c              |  3 ++-
 sys/dev/usb/controller/xlnx_dwc3.c                 |  3 ++-
 sys/dev/usb/input/usbhid.c                         |  7 +------
 sys/dev/usb/misc/cp2112.c                          |  2 +-
 sys/dev/usb/misc/i2ctinyusb.c                      |  2 +-
 sys/dev/viapm/viapm.c                              |  4 ++--
 sys/dev/vmd/vmd.c                                  |  3 ++-
 sys/dev/vnic/mrml_bridge.c                         |  3 ++-
 sys/dev/vnic/thunder_mdio_fdt.c                    |  3 ++-
 sys/dev/xen/bus/xenpv.c                            |  5 ++---
 sys/dev/xen/pcifront/pcifront.c                    |  6 ++++--
 sys/dev/xen/xenstore/xenstore.c                    |  4 ++--
 sys/dev/xilinx/axi_quad_spi.c                      |  3 ++-
 sys/i386/acpica/acpi_machdep.c                     |  3 ++-
 sys/isa/isa_common.c                               |  7 ++++---
 sys/isa/vga_isa.c                                  |  4 ++--
 sys/powerpc/mambo/mambo.c                          |  3 ++-
 sys/powerpc/mpc85xx/fsl_espi.c                     |  4 ++--
 sys/powerpc/mpc85xx/i2c.c                          |  2 +-
 sys/powerpc/mpc85xx/lbc.c                          |  3 ++-
 sys/powerpc/ofw/ofw_pcibus.c                       |  3 ++-
 sys/powerpc/powermac/cuda.c                        |  3 ++-
 sys/powerpc/powermac/kiic.c                        |  3 ++-
 sys/powerpc/powermac/macgpio.c                     |  3 ++-
 sys/powerpc/powermac/macio.c                       |  3 ++-
 sys/powerpc/powermac/pmu.c                         |  3 ++-
 sys/powerpc/powermac/smu.c                         |  6 ++++--
 sys/powerpc/powermac/uninorth.c                    |  3 ++-
 sys/powerpc/powernv/opal_console.c                 |  3 ++-
 sys/powerpc/powernv/opal_dev.c                     |  3 ++-
 sys/powerpc/powernv/opal_i2c.c                     |  3 ++-
 sys/powerpc/powernv/opal_i2cm.c                    |  3 ++-
 sys/powerpc/powernv/opal_sensor.c                  |  3 ++-
 sys/powerpc/powernv/powernv_centaur.c              |  3 ++-
 sys/powerpc/powernv/powernv_xscom.c                |  3 ++-
 sys/powerpc/powerpc/nexus.c                        |  2 +-
 sys/powerpc/ps3/ps3bus.c                           |  3 ++-
 sys/powerpc/pseries/vdevice.c                      |  3 ++-
 sys/powerpc/psim/ata_iobus.c                       |  3 ++-
 sys/powerpc/psim/iobus.c                           |  3 ++-
 sys/riscv/riscv/nexus.c                            |  2 +-
 sys/riscv/riscv/riscv_console.c                    |  2 +-
 sys/riscv/sifive/fu740_pci_dw.c                    |  3 ++-
 sys/x86/pci/pci_bus.c                              |  3 ++-
 sys/x86/pci/qpi.c                                  |  6 ++++--
 sys/x86/x86/legacy.c                               |  4 ++--
 sys/x86/x86/mptable_pci.c                          |  3 ++-
 sys/x86/x86/nexus.c                                |  2 +-
 270 files changed, 491 insertions(+), 449 deletions(-)

diff --git a/sys/amd64/acpica/acpi_machdep.c b/sys/amd64/acpica/acpi_machdep.c
index 67e71cb2de55..67bbced4f611 100644
--- a/sys/amd64/acpica/acpi_machdep.c
+++ b/sys/amd64/acpica/acpi_machdep.c
@@ -270,8 +270,9 @@ nexus_acpi_attach(device_t dev)
 	bus_identify_children(dev);
 	if (BUS_ADD_CHILD(dev, 10, "acpi", 0) == NULL)
 		panic("failed to add acpi0 device");
+	bus_attach_children(dev);
 
-	return (bus_generic_attach(dev));
+	return (0);
 }
 
 static device_method_t nexus_acpi_methods[] = {
diff --git a/sys/arm/allwinner/aw_rsb.c b/sys/arm/allwinner/aw_rsb.c
index 6ca6b3acbf8c..773b88d01d84 100644
--- a/sys/arm/allwinner/aw_rsb.c
+++ b/sys/arm/allwinner/aw_rsb.c
@@ -449,7 +449,7 @@ rsb_attach(device_t dev)
 		goto fail;
 	}
 
-	bus_generic_attach(dev);
+	bus_attach_children(dev);
 
 	return (0);
 
diff --git a/sys/arm/annapurna/alpine/alpine_pci_msix.c b/sys/arm/annapurna/alpine/alpine_pci_msix.c
index c4ecfe68144a..fc2915ae7815 100644
--- a/sys/arm/annapurna/alpine/alpine_pci_msix.c
+++ b/sys/arm/annapurna/alpine/alpine_pci_msix.c
@@ -216,7 +216,8 @@ al_msix_attach(device_t dev)
 
 	device_printf(dev, "MSI-X SPI IRQ %d-%d\n", sc->irq_min, sc->irq_max);
 
-	return (bus_generic_attach(dev));
+	bus_attach_children(dev);
+	return (0);
 }
 
 static int
diff --git a/sys/arm/arm/gic_acpi.c b/sys/arm/arm/gic_acpi.c
index f30f51e1a1b7..6c8257beddfb 100644
--- a/sys/arm/arm/gic_acpi.c
+++ b/sys/arm/arm/gic_acpi.c
@@ -243,7 +243,7 @@ gic_acpi_attach(device_t dev)
 	/* If we have children probe and attach them */
 	if (arm_gic_add_children(dev)) {
 		bus_identify_children(dev);
-		return (bus_generic_attach(dev));
+		bus_attach_children(dev);
 	}
 
 	return (0);
diff --git a/sys/arm/arm/gic_fdt.c b/sys/arm/arm/gic_fdt.c
index 6c5b5be43175..1546e754c2e3 100644
--- a/sys/arm/arm/gic_fdt.c
+++ b/sys/arm/arm/gic_fdt.c
@@ -186,7 +186,7 @@ gic_fdt_attach(device_t dev)
 	/* If we have children probe and attach them */
 	if (arm_gic_add_children(dev)) {
 		bus_identify_children(dev);
-		return (bus_generic_attach(dev));
+		bus_attach_children(dev);
 	}
 
 	return (0);
diff --git a/sys/arm/arm/nexus.c b/sys/arm/arm/nexus.c
index 06f599652698..3653d7087a5c 100644
--- a/sys/arm/arm/nexus.c
+++ b/sys/arm/arm/nexus.c
@@ -185,7 +185,7 @@ nexus_attach(device_t dev)
 	 * Next, deal with the children we know about already.
 	 */
 	bus_identify_children(dev);
-	bus_generic_attach(dev);
+	bus_attach_children(dev);
 
 	return (0);
 }
diff --git a/sys/arm/broadcom/bcm2835/bcm2835_clkman.c b/sys/arm/broadcom/bcm2835/bcm2835_clkman.c
index 744125cc2bb4..7061acbba820 100644
--- a/sys/arm/broadcom/bcm2835/bcm2835_clkman.c
+++ b/sys/arm/broadcom/bcm2835/bcm2835_clkman.c
@@ -112,7 +112,8 @@ bcm2835_clkman_attach(device_t dev)
 	sc->sc_m_bst = rman_get_bustag(sc->sc_m_res);
 	sc->sc_m_bsh = rman_get_bushandle(sc->sc_m_res);
 
-	return (bus_generic_attach(dev));
+	bus_attach_children(dev);
+	return (0);
 }
 
 uint32_t
diff --git a/sys/arm/broadcom/bcm2835/bcm2835_pwm.c b/sys/arm/broadcom/bcm2835/bcm2835_pwm.c
index c1711261922d..ad794a6d20ed 100644
--- a/sys/arm/broadcom/bcm2835/bcm2835_pwm.c
+++ b/sys/arm/broadcom/bcm2835/bcm2835_pwm.c
@@ -460,7 +460,8 @@ bcm_pwm_attach(device_t dev)
 	sc->period2 = 10000;  /* 12.5 khz */
 	sc->ratio2 = 2500;    /* 25% */
 
-	return (bus_generic_attach(dev));
+	bus_attach_children(dev);
+	return (0);
 }
 
 static int
diff --git a/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c b/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c
index 5ff7b5069c6b..e0c4327d8e05 100644
--- a/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c
+++ b/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c
@@ -354,7 +354,7 @@ bcm_sdhci_attach(device_t dev)
 	    SDHCI_BUFFER;
 
 	bus_identify_children(dev);
-	bus_generic_attach(dev);
+	bus_attach_children(dev);
 
 	sdhci_start_slot(&sc->sc_slot);
 
diff --git a/sys/arm/broadcom/bcm2835/bcm2835_sdhost.c b/sys/arm/broadcom/bcm2835/bcm2835_sdhost.c
index 29f062d6ab2b..2fe641ebe390 100644
--- a/sys/arm/broadcom/bcm2835/bcm2835_sdhost.c
+++ b/sys/arm/broadcom/bcm2835/bcm2835_sdhost.c
@@ -473,7 +473,7 @@ bcm_sdhost_attach(device_t dev)
 	sdhci_init_slot(dev, &sc->sc_slot, 0);
 
 	bus_identify_children(dev);
-	bus_generic_attach(dev);
+	bus_attach_children(dev);
 
 	sdhci_start_slot(&sc->sc_slot);
 
diff --git a/sys/arm/broadcom/bcm2835/bcm2835_spi.c b/sys/arm/broadcom/bcm2835/bcm2835_spi.c
index 17419be0c8a7..a1a77d9fabb0 100644
--- a/sys/arm/broadcom/bcm2835/bcm2835_spi.c
+++ b/sys/arm/broadcom/bcm2835/bcm2835_spi.c
@@ -299,8 +299,9 @@ bcm_spi_attach(device_t dev)
 #endif
 
 	device_add_child(dev, "spibus", DEVICE_UNIT_ANY);
+	bus_attach_children(dev);
 
-	return (bus_generic_attach(dev));
+	return (0);
 }
 
 static int
diff --git a/sys/arm/broadcom/bcm2835/bcm2838_pci.c b/sys/arm/broadcom/bcm2835/bcm2838_pci.c
index 0f41dcff37ca..2b2ad1e3bdf8 100644
--- a/sys/arm/broadcom/bcm2835/bcm2838_pci.c
+++ b/sys/arm/broadcom/bcm2835/bcm2838_pci.c
@@ -745,7 +745,8 @@ bcm_pcib_attach(device_t dev)
 
 	/* Done. */
 	device_add_child(dev, "pci", DEVICE_UNIT_ANY);
-	return (bus_generic_attach(dev));
+	bus_attach_children(dev);
+	return (0);
 }
 
 /*
diff --git a/sys/arm/freescale/vybrid/vf_spi.c b/sys/arm/freescale/vybrid/vf_spi.c
index 5d32723e118c..12dbaabe987e 100644
--- a/sys/arm/freescale/vybrid/vf_spi.c
+++ b/sys/arm/freescale/vybrid/vf_spi.c
@@ -197,7 +197,8 @@ spi_attach(device_t dev)
 	WRITE4(sc, SPI_CTAR0, reg);
 
 	device_add_child(dev, "spibus", 0);
-	return (bus_generic_attach(dev));
+	bus_attach_children(dev);
+	return (0);
 }
 
 static int
diff --git a/sys/arm/mv/a37x0_iic.c b/sys/arm/mv/a37x0_iic.c
index 01fda1579bd6..f9a71b97240a 100644
--- a/sys/arm/mv/a37x0_iic.c
+++ b/sys/arm/mv/a37x0_iic.c
@@ -237,7 +237,8 @@ a37x0_iic_attach(device_t dev)
 	}
 
 	/* Probe and attach the iicbus. */
-	return (bus_generic_attach(dev));
+	bus_attach_children(dev);
+	return (0);
 }
 
 static int
diff --git a/sys/arm/mv/mv_pci.c b/sys/arm/mv/mv_pci.c
index 69c72c074c67..5983076d6be8 100644
--- a/sys/arm/mv/mv_pci.c
+++ b/sys/arm/mv/mv_pci.c
@@ -562,7 +562,8 @@ mv_pcib_attach(device_t self)
 	}
 
 	mtx_init(&sc->sc_msi_mtx, "msi_mtx", NULL, MTX_DEF);
-	return (bus_generic_attach(self));
+	bus_attach_children(self);
+	return (0);
 
 error:
 	/* XXX SYS_RES_ should be released here */
diff --git a/sys/arm/mv/mv_pci_ctrl.c b/sys/arm/mv/mv_pci_ctrl.c
index e32d38281e9d..902c0e129dbb 100644
--- a/sys/arm/mv/mv_pci_ctrl.c
+++ b/sys/arm/mv/mv_pci_ctrl.c
@@ -149,7 +149,8 @@ mv_pcib_ctrl_attach(device_t dev)
 	if (err != 0)
 		return (err);
 
-	return (bus_generic_attach(dev));
+	bus_attach_children(dev);
+	return (0);
 }
 
 static int
diff --git a/sys/arm/mv/mvebu_gpio.c b/sys/arm/mv/mvebu_gpio.c
index a2001589867c..681cf20f7f9f 100644
--- a/sys/arm/mv/mvebu_gpio.c
+++ b/sys/arm/mv/mvebu_gpio.c
@@ -810,7 +810,8 @@ mvebu_gpio_attach(device_t dev)
 		return (ENXIO);
 	}
 
-	return (bus_generic_attach(dev));
+	bus_attach_children(dev);
+	return (0);
 }
 
 static int
diff --git a/sys/arm/nvidia/as3722.c b/sys/arm/nvidia/as3722.c
index ed5f47363b01..55cdc5111a15 100644
--- a/sys/arm/nvidia/as3722.c
+++ b/sys/arm/nvidia/as3722.c
@@ -328,7 +328,8 @@ as3722_attach(device_t dev)
 		device_printf(dev, "Cannot setup interrupt.\n");
 		goto fail;
 	}
-	return (bus_generic_attach(dev));
+	bus_attach_children(dev);
+	return (0);
 
 fail:
 	if (sc->irq_h != NULL)
diff --git a/sys/arm/nvidia/drm2/tegra_dc.c b/sys/arm/nvidia/drm2/tegra_dc.c
index a8a0e3f4abf8..eca7ce78c9b2 100644
--- a/sys/arm/nvidia/drm2/tegra_dc.c
+++ b/sys/arm/nvidia/drm2/tegra_dc.c
@@ -1368,7 +1368,8 @@ dc_attach(device_t dev)
 		goto fail;
 	}
 
-	return (bus_generic_attach(dev));
+	bus_attach_children(dev);
+	return (0);
 
 fail:
 	TEGRA_DRM_DEREGISTER_CLIENT(device_get_parent(sc->dev), sc->dev);
diff --git a/sys/arm/nvidia/drm2/tegra_hdmi.c b/sys/arm/nvidia/drm2/tegra_hdmi.c
index 067df21c889c..e727d0279247 100644
--- a/sys/arm/nvidia/drm2/tegra_hdmi.c
+++ b/sys/arm/nvidia/drm2/tegra_hdmi.c
@@ -1242,7 +1242,8 @@ hdmi_attach(device_t dev)
 		device_printf(dev, "Cannot register DRM device\n");
 		goto fail;
 	}
-	return (bus_generic_attach(dev));
+	bus_attach_children(dev);
+	return (0);
 
 fail:
 	TEGRA_DRM_DEREGISTER_CLIENT(device_get_parent(sc->dev), sc->dev);
diff --git a/sys/arm/nvidia/drm2/tegra_host1x.c b/sys/arm/nvidia/drm2/tegra_host1x.c
index ee43efba5ba7..81f727a83edc 100644
--- a/sys/arm/nvidia/drm2/tegra_host1x.c
+++ b/sys/arm/nvidia/drm2/tegra_host1x.c
@@ -571,7 +571,8 @@ host1x_attach(device_t dev)
 		goto fail;
 	}
 
-	return (bus_generic_attach(dev));
+	bus_attach_children(dev);
+	return (0);
 
 fail:
 	if (sc->tegra_drm != NULL)
diff --git a/sys/arm/nvidia/tegra_abpmisc.c b/sys/arm/nvidia/tegra_abpmisc.c
index 1f54a918f63b..7f219b79990e 100644
--- a/sys/arm/nvidia/tegra_abpmisc.c
+++ b/sys/arm/nvidia/tegra_abpmisc.c
@@ -151,7 +151,8 @@ tegra_abpmisc_attach(device_t dev)
 	}
 
 	dev_sc = sc;
-	return (bus_generic_attach(dev));
+	bus_attach_children(dev);
+	return (0);
 
 fail:
 	if (sc->abp_misc_res != NULL)
diff --git a/sys/arm/nvidia/tegra_efuse.c b/sys/arm/nvidia/tegra_efuse.c
index dc637e6d0bec..a756f9681e92 100644
--- a/sys/arm/nvidia/tegra_efuse.c
+++ b/sys/arm/nvidia/tegra_efuse.c
@@ -481,7 +481,8 @@ tegra_efuse_attach(device_t dev)
 
 	if (bootverbose)
 		tegra_efuse_dump_sku();
-	return (bus_generic_attach(dev));
+	bus_attach_children(dev);
+	return (0);
 
 fail:
 	dev_sc = NULL;
diff --git a/sys/arm/nvidia/tegra_gpio.c b/sys/arm/nvidia/tegra_gpio.c
index 29bc8624e27a..16e1ef94d6a9 100644
--- a/sys/arm/nvidia/tegra_gpio.c
+++ b/sys/arm/nvidia/tegra_gpio.c
@@ -824,7 +824,8 @@ tegra_gpio_attach(device_t dev)
 		return (ENXIO);
 	}
 
-	return (bus_generic_attach(dev));
+	bus_attach_children(dev);
+	return (0);
 }
 
 static int
diff --git a/sys/arm/nvidia/tegra_i2c.c b/sys/arm/nvidia/tegra_i2c.c
index b01f1a1fdce4..bed1bf0ed7e3 100644
--- a/sys/arm/nvidia/tegra_i2c.c
+++ b/sys/arm/nvidia/tegra_i2c.c
@@ -722,7 +722,8 @@ tegra_i2c_attach(device_t dev)
 	}
 
 	/* Probe and attach the iicbus. */
-	return (bus_generic_attach(dev));
+	bus_attach_children(dev);
+	return (0);
 
 fail:
 	if (sc->irq_h != NULL)
diff --git a/sys/arm/nvidia/tegra_mc.c b/sys/arm/nvidia/tegra_mc.c
index 0f05c32117e9..2568ff8324af 100644
--- a/sys/arm/nvidia/tegra_mc.c
+++ b/sys/arm/nvidia/tegra_mc.c
@@ -260,7 +260,8 @@ tegra_mc_attach(device_t dev)
 	/* Enable Interrupts */
 	WR4(sc, MC_INTMASK, MC_INT_INT_MASK);
 
-	return (bus_generic_attach(dev));
+	bus_attach_children(dev);
+	return (0);
 
 fail:
 	if (sc->clk != NULL)
diff --git a/sys/arm/nvidia/tegra_pcie.c b/sys/arm/nvidia/tegra_pcie.c
index 2a91a81d40a9..b76e74da4f7d 100644
--- a/sys/arm/nvidia/tegra_pcie.c
+++ b/sys/arm/nvidia/tegra_pcie.c
@@ -1566,8 +1566,9 @@ tegra_pcib_attach(device_t dev)
 		 goto out;
 #endif
 	device_add_child(dev, "pci", DEVICE_UNIT_ANY);
+	bus_attach_children(dev);
 
-	return (bus_generic_attach(dev));
+	return (0);
 
 out:
 
diff --git a/sys/arm/nvidia/tegra_rtc.c b/sys/arm/nvidia/tegra_rtc.c
index 09bd42bc64e3..b94ee24e81a5 100644
--- a/sys/arm/nvidia/tegra_rtc.c
+++ b/sys/arm/nvidia/tegra_rtc.c
@@ -246,7 +246,8 @@ tegra_rtc_attach(device_t dev)
 	 */
 	/* clock_register(dev, 1000000); */
 
-	return (bus_generic_attach(dev));
+	bus_attach_children(dev);
+	return (0);
 
 fail:
 	if (sc->clk != NULL)
diff --git a/sys/arm/nvidia/tegra_sdhci.c b/sys/arm/nvidia/tegra_sdhci.c
index d37f71a150a2..4d2eaccf4c27 100644
--- a/sys/arm/nvidia/tegra_sdhci.c
+++ b/sys/arm/nvidia/tegra_sdhci.c
@@ -387,7 +387,7 @@ tegra_sdhci_attach(device_t dev)
 	sc->gpio = sdhci_fdt_gpio_setup(sc->dev, &sc->slot);
 
 	bus_identify_children(dev);
-	bus_generic_attach(dev);
+	bus_attach_children(dev);
 
 	sdhci_start_slot(&sc->slot);
 
diff --git a/sys/arm/nvidia/tegra_soctherm.c b/sys/arm/nvidia/tegra_soctherm.c
index fa6d0d9fa5cd..630287adb137 100644
--- a/sys/arm/nvidia/tegra_soctherm.c
+++ b/sys/arm/nvidia/tegra_soctherm.c
@@ -780,7 +780,8 @@ soctherm_attach(device_t dev)
 	}
 
 	OF_device_register_xref(OF_xref_from_node(node), dev);
-	return (bus_generic_attach(dev));
+	bus_attach_children(dev);
+	return (0);
 
 fail:
 	if (sc->irq_ih != NULL)
diff --git a/sys/arm/qualcomm/ipq4018_usb_hs_phy.c b/sys/arm/qualcomm/ipq4018_usb_hs_phy.c
index 97f65766466c..5ed964abf0ec 100644
--- a/sys/arm/qualcomm/ipq4018_usb_hs_phy.c
+++ b/sys/arm/qualcomm/ipq4018_usb_hs_phy.c
@@ -200,7 +200,8 @@ ipq4018_usb_hs_usbphy_attach(device_t dev)
 	rv = ipq4018_usb_hs_usbphy_init_phy(sc, node);
 	if (rv != 0)
 		goto fail;
-	return (bus_generic_attach(dev));
+	bus_attach_children(dev);
+	return (0);
 
 fail:
 	return (ENXIO);
diff --git a/sys/arm/qualcomm/ipq4018_usb_ss_phy.c b/sys/arm/qualcomm/ipq4018_usb_ss_phy.c
index e9b880319bbc..ef8a315e3906 100644
--- a/sys/arm/qualcomm/ipq4018_usb_ss_phy.c
+++ b/sys/arm/qualcomm/ipq4018_usb_ss_phy.c
@@ -180,7 +180,8 @@ ipq4018_usb_ss_usbphy_attach(device_t dev)
 	rv = ipq4018_usb_ss_usbphy_init_phy(sc, node);
 	if (rv != 0)
 		goto fail;
-	return (bus_generic_attach(dev));
+	bus_attach_children(dev);
+	return (0);
 
 fail:
 	return (ENXIO);
diff --git a/sys/arm/ti/am335x/am335x_ehrpwm.c b/sys/arm/ti/am335x/am335x_ehrpwm.c
index 77b6384b17a7..95301f9cfed3 100644
--- a/sys/arm/ti/am335x/am335x_ehrpwm.c
+++ b/sys/arm/ti/am335x/am335x_ehrpwm.c
@@ -518,7 +518,8 @@ am335x_ehrpwm_attach(device_t dev)
 	}
 
 	bus_identify_children(dev);
-	return (bus_generic_attach(dev));
+	bus_attach_children(dev);
+	return (0);
 fail:
 	PWM_LOCK_DESTROY(sc);
 	if (sc->sc_mem_res)
diff --git a/sys/arm/ti/am335x/am335x_pwmss.c b/sys/arm/ti/am335x/am335x_pwmss.c
index 9d584910ee58..039448f9099f 100644
--- a/sys/arm/ti/am335x/am335x_pwmss.c
+++ b/sys/arm/ti/am335x/am335x_pwmss.c
@@ -158,7 +158,8 @@ am335x_pwmss_attach(device_t dev)
 	for (node = OF_child(node); node > 0; node = OF_peer(node))
 		simplebus_add_device(dev, node, 0, NULL, -1, NULL);
 
-	return (bus_generic_attach(dev));
+	bus_attach_children(dev);
+	return (0);
 }
 
 static int
diff --git a/sys/arm/ti/am335x/am335x_usb_phy.c b/sys/arm/ti/am335x/am335x_usb_phy.c
index 05b1c085aea3..56fb49519336 100644
--- a/sys/arm/ti/am335x/am335x_usb_phy.c
+++ b/sys/arm/ti/am335x/am335x_usb_phy.c
@@ -85,7 +85,8 @@ ti_usb_phy_attach(device_t dev)
 
 	/* FIXME: Add dev/phy/ interface */
 
-	return (bus_generic_attach(dev));
+	bus_attach_children(dev);
+	return (0);
 }
 
 static int
diff --git a/sys/arm/ti/clk/ti_clkctrl.c b/sys/arm/ti/clk/ti_clkctrl.c
index 169cc7a62f73..cba832640fa3 100644
--- a/sys/arm/ti/clk/ti_clkctrl.c
+++ b/sys/arm/ti/clk/ti_clkctrl.c
@@ -241,7 +241,8 @@ cleanup:
 	if (err)
 		return (err);
 
-	return (bus_generic_attach(dev));
+	bus_attach_children(dev);
+	return (0);
 }
 
 static int
diff --git a/sys/arm/ti/clk/ti_divider_clock.c b/sys/arm/ti/clk/ti_divider_clock.c
index ebe623762efc..7812d3607b07 100644
--- a/sys/arm/ti/clk/ti_divider_clock.c
+++ b/sys/arm/ti/clk/ti_divider_clock.c
@@ -182,7 +182,8 @@ ti_divider_attach(device_t dev)
 	if (err) {
 		/* free_clkdef will be called in ti_divider_new_pass */
 		DPRINTF(sc->sc_dev, "find_parent_clock_names failed\n");
-		return (bus_generic_attach(sc->sc_dev));
+		bus_attach_children(sc->sc_dev);
+		return (0);
 	}
 
 	err = register_clk(sc);
@@ -190,14 +191,16 @@ ti_divider_attach(device_t dev)
 	if (err) {
 		/* free_clkdef will be called in ti_divider_new_pass */
 		DPRINTF(sc->sc_dev, "register_clk failed\n");
-		return (bus_generic_attach(sc->sc_dev));
+		bus_attach_children(sc->sc_dev);
+		return (0);
 	}
 
 	sc->attach_done = true;
 
 	free_clkdef(&sc->div_def.clkdef);
 
-	return (bus_generic_attach(sc->sc_dev));
+	bus_attach_children(sc->sc_dev);
+	return (0);
 }
 
 static int
diff --git a/sys/arm/ti/clk/ti_dpll_clock.c b/sys/arm/ti/clk/ti_dpll_clock.c
index 84b86008b6d6..9252dc1abfe1 100644
--- a/sys/arm/ti/clk/ti_dpll_clock.c
+++ b/sys/arm/ti/clk/ti_dpll_clock.c
@@ -292,7 +292,8 @@ ti_dpll_attach(device_t dev)
 	if (err) {
 		/* free_clkdef will be called in ti_dpll_new_pass */
 		DPRINTF(sc->dev, "find_parent_clock_names failed\n");
-		return (bus_generic_attach(sc->dev));
+		bus_attach_children(sc->dev);
+		return (0);
 	}
 
 	err = register_clk(sc);
@@ -300,14 +301,16 @@ ti_dpll_attach(device_t dev)
 	if (err) {
 		/* free_clkdef will be called in ti_dpll_new_pass */
 		DPRINTF(sc->dev, "register_clk failed\n");
-		return (bus_generic_attach(sc->dev));
+		bus_attach_children(sc->dev);
+		return (0);
 	}
 
 	sc->attach_done = true;
 
 	free_clkdef(&sc->dpll_def.clkdef);
 
-	return (bus_generic_attach(sc->dev));
+	bus_attach_children(sc->dev);
+	return (0);
 }
 
 static int
diff --git a/sys/arm/ti/clk/ti_gate_clock.c b/sys/arm/ti/clk/ti_gate_clock.c
index fc54a196fb5e..71512b8490ab 100644
--- a/sys/arm/ti/clk/ti_gate_clock.c
+++ b/sys/arm/ti/clk/ti_gate_clock.c
@@ -185,7 +185,8 @@ ti_gate_attach(device_t dev)
 	if (err) {
 		/* free_clkdef will be called in ti_gate_new_pass */
 		DPRINTF(sc->sc_dev, "find_parent_clock_names failed\n");
-		return (bus_generic_attach(sc->sc_dev));
+		bus_attach_children(sc->dev);
+		return (0);
 	}
 
 	err = register_clk(sc);
@@ -193,14 +194,16 @@ ti_gate_attach(device_t dev)
 	if (err) {
 		/* free_clkdef will be called in ti_gate_new_pass */
 		DPRINTF(sc->sc_dev, "register_clk failed\n");
-		return (bus_generic_attach(sc->sc_dev));
+		bus_attach_children(sc->dev);
+		return (0);
 	}
 
 	sc->attach_done = true;
 
 	free_clkdef(&sc->gate_def.clkdef);
 
-	return (bus_generic_attach(sc->sc_dev));
+	bus_attach_children(sc->dev);
+	return (0);
 }
 
 static int
diff --git a/sys/arm/ti/clk/ti_mux_clock.c b/sys/arm/ti/clk/ti_mux_clock.c
index a6c506fedce0..ac570ba58439 100644
--- a/sys/arm/ti/clk/ti_mux_clock.c
+++ b/sys/arm/ti/clk/ti_mux_clock.c
@@ -167,7 +167,8 @@ ti_mux_attach(device_t dev)
 	if (err) {
 		/* free_clkdef will be called in ti_mux_new_pass */
 		DPRINTF(sc->sc_dev, "find_parent_clock_names failed\n");
-		return (bus_generic_attach(sc->sc_dev));
+		bus_attach_children(sc->dev);
+		return (0);
 	}
 
 	err = register_clk(sc);
@@ -175,14 +176,16 @@ ti_mux_attach(device_t dev)
 	if (err) {
 		/* free_clkdef will be called in ti_mux_new_pass */
 		DPRINTF(sc->sc_dev, "register_clk failed\n");
-		return (bus_generic_attach(sc->sc_dev));
+		bus_attach_children(sc->dev);
+		return (0);
 	}
 
 	sc->attach_done = true;
 
 	free_clkdef(&sc->mux_def.clkdef);
 
-	return (bus_generic_attach(sc->sc_dev));
+	bus_attach_children(sc->dev);
+	return (0);
 }
 
 static void
diff --git a/sys/arm/ti/cpsw/if_cpsw.c b/sys/arm/ti/cpsw/if_cpsw.c
index 7756940bb28d..732b5a81857a 100644
--- a/sys/arm/ti/cpsw/if_cpsw.c
+++ b/sys/arm/ti/cpsw/if_cpsw.c
@@ -912,7 +912,7 @@ cpsw_attach(device_t dev)
 		}
 	}
 	bus_identify_children(dev);
-	bus_generic_attach(dev);
+	bus_attach_children(dev);
 
 	return (0);
 }
diff --git a/sys/arm/ti/ti_omap4_cm.c b/sys/arm/ti/ti_omap4_cm.c
index 67c17ec4df98..572bae7173a1 100644
--- a/sys/arm/ti/ti_omap4_cm.c
+++ b/sys/arm/ti/ti_omap4_cm.c
@@ -115,7 +115,8 @@ ti_omap4_cm_attach(device_t dev)
 			device_probe_and_attach(cdev);
 	}
 
-	return (bus_generic_attach(dev));
+	bus_attach_children(dev);
+	return (0);
 }
 
 static int
diff --git a/sys/arm/ti/ti_prcm.c b/sys/arm/ti/ti_prcm.c
index 7afb9a2a5678..3fc1fef1fdfb 100644
--- a/sys/arm/ti/ti_prcm.c
+++ b/sys/arm/ti/ti_prcm.c
@@ -192,8 +192,8 @@ ti_prcm_attach(device_t dev)
 	for (child = OF_child(node); child != 0; child = OF_peer(child)) {
 		simplebus_add_device(dev, child, 0, NULL, -1, NULL);
 	}
-
-	return (bus_generic_attach(sc->dev));
+	bus_attach_children(sc->dev);
+	return (0);
 }
 
 int
diff --git a/sys/arm/ti/ti_scm.c b/sys/arm/ti/ti_scm.c
index 23507febb90d..dc687641502c 100644
--- a/sys/arm/ti/ti_scm.c
+++ b/sys/arm/ti/ti_scm.c
@@ -127,7 +127,8 @@ ti_scm_attach(device_t dev)
 			device_probe_and_attach(cdev);
 	}
 
-	return (bus_generic_attach(dev));
+	bus_attach_children(dev);
+	return (0);
 }
 
 static int
diff --git a/sys/arm/ti/ti_scm_syscon.c b/sys/arm/ti/ti_scm_syscon.c
index 729af03c4abd..37d802d6c5d7 100644
--- a/sys/arm/ti/ti_scm_syscon.c
+++ b/sys/arm/ti/ti_scm_syscon.c
@@ -190,7 +190,8 @@ ti_scm_syscon_attach(device_t dev)
 		simplebus_add_device(sc->dev, child, 0, NULL, -1, NULL);
 	}
 
-	return (bus_generic_attach(sc->dev));
+	bus_attach_children(sc->dev);
+	return (0);
*** 3536 LINES SKIPPED ***