aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2024-11-05 01:30:13 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2024-11-05 01:30:13 +0000
commitd62d10eb1229c9aa0b3cf1b18872df59c18155db (patch)
tree7feec17c01d7f3191e8ea8c52c661a6c0b06360e /sys/dev
parent9e1db51d4b5fce8a1ea7271018970760e396500c (diff)
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/acpica/acpi_container.c10
-rw-r--r--sys/dev/adb/adb_bus.c8
-rw-r--r--sys/dev/mdio/mdio.c10
3 files changed, 3 insertions, 25 deletions
diff --git a/sys/dev/acpica/acpi_container.c b/sys/dev/acpica/acpi_container.c
index 0f23f6b25fe1..81a1ee8ce25c 100644
--- a/sys/dev/acpica/acpi_container.c
+++ b/sys/dev/acpica/acpi_container.c
@@ -38,7 +38,6 @@ ACPI_MODULE_NAME("CONTAINER")
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 @@ static device_method_t acpi_syscont_methods[] = {
/* 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),
@@ -109,13 +108,6 @@ acpi_syscont_attach(device_t 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
index 8c805254a2e6..9e0d1f2a1ce5 100644
--- 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 @@ static device_method_t adb_bus_methods[] = {
/* 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 @@ adb_bus_enumerate(void *xdev)
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
index c34493254e0f..64d3b23c2372 100644
--- a/sys/dev/mdio/mdio.c
+++ b/sys/dev/mdio/mdio.c
@@ -60,14 +60,6 @@ mdio_attach(device_t 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 @@ static device_method_t mdio_methods[] = {
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 */