Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107458802
D47370.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
908 B
Referenced Files
None
Subscribers
None
D47370.diff
View Options
diff --git a/sys/dev/iicbus/iicbus.c b/sys/dev/iicbus/iicbus.c
--- a/sys/dev/iicbus/iicbus.c
+++ b/sys/dev/iicbus/iicbus.c
@@ -248,6 +248,18 @@
dev, order, name, unit, sizeof(struct iicbus_ivar)));
}
+static void
+iicbus_child_deleted(device_t dev, device_t child)
+{
+ struct iicbus_ivar *devi;
+
+ devi = device_get_ivars(child);
+ if (devi == NULL)
+ return;
+ resource_list_free(&devi->rl);
+ free(devi, M_DEVBUF);
+}
+
static void
iicbus_hinted_child(device_t bus, const char *dname, int dunit)
{
@@ -360,6 +372,7 @@
DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource),
DEVMETHOD(bus_get_resource_list, iicbus_get_resource_list),
DEVMETHOD(bus_add_child, iicbus_add_child),
+ DEVMETHOD(bus_child_deleted, iicbus_child_deleted),
DEVMETHOD(bus_print_child, iicbus_print_child),
DEVMETHOD(bus_probe_nomatch, iicbus_probe_nomatch),
DEVMETHOD(bus_read_ivar, iicbus_read_ivar),
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jan 15, 11:17 AM (11 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14417932
Default Alt Text
D47370.diff (908 B)
Attached To
Mode
D47370: iicbus: Use a bus_child_deleted method to free ivars for children
Attached
Detach File
Event Timeline
Log In to Comment