Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148239770
D3926.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D3926.id.diff
View Options
Index: head/sys/dev/iicbus/iicbb.c
===================================================================
--- head/sys/dev/iicbus/iicbb.c
+++ head/sys/dev/iicbus/iicbb.c
@@ -149,22 +149,9 @@
static int
iicbb_detach(device_t dev)
{
- struct iicbb_softc *sc = (struct iicbb_softc *)device_get_softc(dev);
- device_t child;
- /*
- * We need to save child because the detach indirectly causes
- * sc->iicbus to be zeroed. Since we added the device
- * unconditionally in iicbb_attach, we need to make sure we
- * delete it here. See iicbb_child_detached. We need that
- * callback in case newbus detached our children w/o detaching
- * us (say iicbus is a module and unloaded w/o iicbb being
- * unloaded).
- */
- child = sc->iicbus;
bus_generic_detach(dev);
- if (child)
- device_delete_child(dev, child);
+ device_delete_children(dev);
return (0);
}
Index: head/sys/dev/iicbus/iicbus.c
===================================================================
--- head/sys/dev/iicbus/iicbus.c
+++ head/sys/dev/iicbus/iicbus.c
@@ -135,6 +135,7 @@
iicbus_reset(dev, IIC_FASTEST, 0, NULL);
bus_generic_detach(dev);
+ device_delete_children(dev);
mtx_destroy(&sc->lock);
return (0);
}
Index: head/sys/dev/iicbus/iicoc.c
===================================================================
--- head/sys/dev/iicbus/iicoc.c
+++ head/sys/dev/iicbus/iicoc.c
@@ -229,6 +229,7 @@
iicoc_detach(device_t dev)
{
bus_generic_detach(dev);
+ device_delete_children(dev);
return (0);
}
Index: head/sys/dev/iicbus/iicsmb.c
===================================================================
--- head/sys/dev/iicbus/iicsmb.c
+++ head/sys/dev/iicbus/iicsmb.c
@@ -167,11 +167,9 @@
iicsmb_detach(device_t dev)
{
struct iicsmb_softc *sc = (struct iicsmb_softc *)device_get_softc(dev);
-
+
bus_generic_detach(dev);
- if (sc->smbus) {
- device_delete_child(dev, sc->smbus);
- }
+ device_delete_children(dev);
mtx_destroy(&sc->lock);
return (0);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 17, 5:42 PM (4 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29838007
Default Alt Text
D3926.id.diff (1 KB)
Attached To
Mode
D3926: iicbus: Use device_delete_children() instead of explicit child removal
Attached
Detach File
Event Timeline
Log In to Comment