Page MenuHomeFreeBSD

D47370.diff
No OneTemporary

D47370.diff

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

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)

Event Timeline