git: fa95268aeb8a - stable/14 - Remove bogus detach routines

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Sun, 01 Dec 2024 04:57:21 UTC
The branch stable/14 has been updated by jhb:

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

commit fa95268aeb8acc2e10588aa78d3335bcfccb10a5
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2024-11-05 01:31:16 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2024-12-01 02:46:07 +0000

    Remove bogus detach routines
    
    These drivers are not bus drivers, and would need proper detach
    routines that tore down state stored in the softc.  Better to just
    fail detach outright instead of an incorrect success.
    
    Reviewed by:    imp
    Differential Revision:  https://reviews.freebsd.org/D47389
    
    (cherry picked from commit 7ebc7d1ab76b9d06be9400d6c9fc74fcc43603a1)
---
 sys/dev/gpio/gpiomdio.c | 1 -
 sys/dev/sff/sfp_fdt.c   | 1 -
 2 files changed, 2 deletions(-)

diff --git a/sys/dev/gpio/gpiomdio.c b/sys/dev/gpio/gpiomdio.c
index deb9a25bd290..dc43b2783bc5 100644
--- a/sys/dev/gpio/gpiomdio.c
+++ b/sys/dev/gpio/gpiomdio.c
@@ -213,7 +213,6 @@ static device_method_t gpiomdio_methods[] = {
 	/* Device interface */
 	DEVMETHOD(device_probe,		gpiomdio_probe),
 	DEVMETHOD(device_attach,	gpiomdio_attach),
-	DEVMETHOD(device_detach,	bus_generic_detach),
 
 	/* MDIO interface */
 	DEVMETHOD(miibus_readreg,	gpiomdio_readreg),
diff --git a/sys/dev/sff/sfp_fdt.c b/sys/dev/sff/sfp_fdt.c
index 7430282ede70..e566d8ced78c 100644
--- a/sys/dev/sff/sfp_fdt.c
+++ b/sys/dev/sff/sfp_fdt.c
@@ -138,7 +138,6 @@ static device_method_t sfp_fdt_methods[] = {
 	/* Device interface */
 	DEVMETHOD(device_probe,		sfp_fdt_probe),
 	DEVMETHOD(device_attach,	sfp_fdt_attach),
-	DEVMETHOD(device_detach,	bus_generic_detach),
 
 	/* SFF */
 	DEVMETHOD(sff_get_i2c_bus,	sfp_fdt_get_i2c_bus),