summaryrefslogtreecommitdiffstats
path: root/sys/dev/pcic/i82365.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/pcic/i82365.c')
-rw-r--r--sys/dev/pcic/i82365.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/sys/dev/pcic/i82365.c b/sys/dev/pcic/i82365.c
index 3b11018..5204e94 100644
--- a/sys/dev/pcic/i82365.c
+++ b/sys/dev/pcic/i82365.c
@@ -1514,4 +1514,23 @@ pcic_start_threads(void *arg)
}
}
+int
+pcic_detach(device_t dev)
+{
+ device_t pccarddev;
+ device_t *kids;
+ int nkids;
+ int i;
+ int ret;
+
+ device_get_children(dev, &kids, &nkids);
+ for (i = 0; i < nkids; i++) {
+ if ((ret = device_delete_child(pccarddev, kids[i])) != 0)
+ device_printf(dev, "delete of %s failed: %d\n",
+ device_get_nameunit(kids[i]), ret);
+ }
+ free(kids, M_TEMP);
+ return (bus_generic_detach(dev));
+}
+
SYSINIT(pcic, SI_SUB_KTHREAD_IDLE, SI_ORDER_ANY, pcic_start_threads, 0);
OpenPOWER on IntegriCloud