svn commit: r354064 - stable/11/sys/dev/gpio
Andriy Gapon
avg at FreeBSD.org
Fri Oct 25 09:24:42 UTC 2019
Author: avg
Date: Fri Oct 25 09:24:41 2019
New Revision: 354064
URL: https://svnweb.freebsd.org/changeset/base/354064
Log:
MFC r353727: gpioiic: add the detach method
Modified:
stable/11/sys/dev/gpio/gpioiic.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/dev/gpio/gpioiic.c
==============================================================================
--- stable/11/sys/dev/gpio/gpioiic.c Fri Oct 25 09:23:53 2019 (r354063)
+++ stable/11/sys/dev/gpio/gpioiic.c Fri Oct 25 09:24:41 2019 (r354064)
@@ -141,6 +141,15 @@ gpioiic_attach(device_t dev)
return (0);
}
+static int
+gpioiic_detach(device_t dev)
+{
+
+ bus_generic_detach(dev);
+ device_delete_children(dev);
+ return (0);
+}
+
/*
* Reset bus by setting SDA first and then SCL.
* Must always be called with gpio bus locked.
@@ -239,7 +248,7 @@ static device_method_t gpioiic_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, gpioiic_probe),
DEVMETHOD(device_attach, gpioiic_attach),
- DEVMETHOD(device_detach, bus_generic_detach),
+ DEVMETHOD(device_detach, gpioiic_detach),
/* iicbb interface */
DEVMETHOD(iicbb_setsda, gpioiic_setsda),
More information about the svn-src-stable-11
mailing list