Use bus_generic_detach directly instead of a wrapper

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D47386

(cherry picked from commit d62d10eb1229c9aa0b3cf1b18872df59c18155db)
This commit is contained in:
John Baldwin 2024-11-04 20:30:13 -05:00
parent 53662f9c66
commit 513cd54856
3 changed files with 3 additions and 25 deletions

View file

@ -39,7 +39,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,
@ -55,7 +54,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)
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)

View file

@ -43,7 +43,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);
@ -58,7 +57,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),
@ -189,11 +188,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)
{

View file

@ -59,14 +59,6 @@ mdio_attach(device_t dev)
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 @@ 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 */