git: fba4ef71b71e - stable/13 - Remove bogus detach routines

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

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

commit fba4ef71b71e5f3808680f22401d3eab15dd6a4f
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2024-11-05 01:31:16 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2024-11-30 21:48:00 +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 -
 1 file changed, 1 deletion(-)

diff --git a/sys/dev/gpio/gpiomdio.c b/sys/dev/gpio/gpiomdio.c
index 4e835e2c9ccd..1faf8b7e7a04 100644
--- a/sys/dev/gpio/gpiomdio.c
+++ b/sys/dev/gpio/gpiomdio.c
@@ -215,7 +215,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),