diff --git a/sys/dev/acpica/acpi_container.c b/sys/dev/acpica/acpi_container.c --- a/sys/dev/acpica/acpi_container.c +++ b/sys/dev/acpica/acpi_container.c @@ -38,7 +38,6 @@ static int acpi_syscont_probe(device_t); static int acpi_syscont_attach(device_t); -static int acpi_syscont_detach(device_t); static int acpi_syscont_alloc_msi(device_t, device_t, int count, int maxcount, int *irqs); static int acpi_syscont_release_msi(device_t bus, device_t dev, @@ -54,7 +53,7 @@ /* Device interface */ DEVMETHOD(device_probe, acpi_syscont_probe), DEVMETHOD(device_attach, acpi_syscont_attach), - DEVMETHOD(device_detach, acpi_syscont_detach), + DEVMETHOD(device_detach, bus_generic_detach), /* Bus interface */ DEVMETHOD(bus_add_child, bus_generic_add_child), @@ -108,13 +107,6 @@ return (bus_generic_attach(dev)); } -static int -acpi_syscont_detach(device_t dev) -{ - - return (bus_generic_detach(dev)); -} - static int acpi_syscont_alloc_msi(device_t bus, device_t dev, int count, int maxcount, int *irqs) diff --git a/sys/dev/adb/adb_bus.c b/sys/dev/adb/adb_bus.c --- a/sys/dev/adb/adb_bus.c +++ b/sys/dev/adb/adb_bus.c @@ -42,7 +42,6 @@ static int adb_bus_probe(device_t dev); static int adb_bus_attach(device_t dev); -static int adb_bus_detach(device_t dev); static void adb_bus_enumerate(void *xdev); static void adb_probe_nomatch(device_t dev, device_t child); static int adb_print_child(device_t dev, device_t child); @@ -57,7 +56,7 @@ /* Device interface */ DEVMETHOD(device_probe, adb_bus_probe), DEVMETHOD(device_attach, adb_bus_attach), - DEVMETHOD(device_detach, adb_bus_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), @@ -188,11 +187,6 @@ config_intrhook_disestablish(&sc->enum_hook); } -static int adb_bus_detach(device_t dev) -{ - return (bus_generic_detach(dev)); -} - static void adb_probe_nomatch(device_t dev, device_t child) { diff --git a/sys/dev/mdio/mdio.c b/sys/dev/mdio/mdio.c --- a/sys/dev/mdio/mdio.c +++ b/sys/dev/mdio/mdio.c @@ -59,14 +59,6 @@ return (bus_generic_attach(dev)); } -static int -mdio_detach(device_t dev) -{ - - bus_generic_detach(dev); - return (0); -} - static int mdio_readreg(device_t dev, int phy, int reg) { @@ -108,7 +100,7 @@ DEVMETHOD(device_identify, mdio_identify), DEVMETHOD(device_probe, mdio_probe), DEVMETHOD(device_attach, mdio_attach), - DEVMETHOD(device_detach, mdio_detach), + DEVMETHOD(device_detach, bus_generic_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), /* bus interface */